Re: No memory although more than 1GB free

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Nick Savoiu (_s_a_v_o_i_u__at__ics_._uci_._edu_)
Date: 02/04/04


Date: Wed, 4 Feb 2004 13:07:46 -0800


"Klaus Bonadt" <Bonadt@hotmail.com> wrote in message
news:#A7nts16DHA.3288@TK2MSFTNGP11.phx.gbl...
> > It seems that you could have that case. You could try to walk the
virtual
> > address space and see what's going on. Check out VirtualQueryEx().
>
> DWORD VirtualQuery(
> LPCVOID lpAddress, // address of region
> PMEMORY_BASIC_INFORMATION lpBuffer, // information buffer
> SIZE_T dwLength // size of buffer
> );
>
> Two questions:
> 1.
> How to set lpAddress initially?

You can start it at 0 and then increment it based on the info returned in
lpBuffer (i.e. look up MEMORY_BASIC_INFORMATION).

> 2.
> I will collect sets of memory regions with different attributes. However,
I
> do not know how to interpret these sets.
> Furthermore, I guess I will end up with the same amount of memory, which
> "Process viewer" is presenting.

Yes, but this will give you more info than a simple sum. To understand what
you're being given again see MEMORY_BASIC_INFORMATION.

BTW, what failture code to you get from the allocation functions that you
call?

HTH,
Nick



Relevant Pages

  • Re: No memory although more than 1GB free
    ... If will also try to give the usage of the allocated regions, their size, ... "Klaus Bonadt" wrote in message ... Check out VirtualQueryEx(). ... > I will collect sets of memory regions with different attributes. ...
    (microsoft.public.vc.language)
  • Re: No memory although more than 1GB free
    ... If will also try to give the usage of the allocated regions, their size, ... "Klaus Bonadt" wrote in message ... Check out VirtualQueryEx(). ... > I will collect sets of memory regions with different attributes. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: No memory although more than 1GB free
    ... "Klaus Bonadt" wrote in message ... Check out VirtualQueryEx(). ... > I will collect sets of memory regions with different attributes. ... BTW, what failture code to you get from the allocation functions that you ...
    (microsoft.public.vc.language)
  • Re: No memory although more than 1GB free
    ... Check out VirtualQueryEx(). ... I will collect sets of memory regions with different attributes. ... "Process viewer" is presenting. ... Regards, ...
    (microsoft.public.vc.language)
  • Re: No memory although more than 1GB free
    ... Check out VirtualQueryEx(). ... I will collect sets of memory regions with different attributes. ... "Process viewer" is presenting. ... Regards, ...
    (microsoft.public.windowsxp.perform_maintain)