Statements were made to the fact that this function returned the wrong
numbers.
I wanted to know if this has been addressed or is the function correct
as it is ?
I need to be able to retrieve the "Commit Charge" and display it much
the same way that the Task-Manager does. Does anyone know how to
calculate "Commit Charge" from what the present version of
"GlobalMemoryStatusEx" returns.
Thanks
Sid.
Commit charges are the total virtual address space allocated to
all the processes and the operating system as well, however, you
can use the API VirtualQueryEx() to get information about a range
of pages within the virtual address space of a specified process.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualqueryex.asp
Hope these information helps,
Kellie.
"sid" <sidw...@alexian.net> wrote in message
news:1133205056....@z14g2000cwz.googlegroups.com...
The proper, win32 way, would be using GetSystemInfo for page size.
Dunno how to get MmTotalCommittedPages in win32, maybe someone else
does.
> In a thread last year:
> http://groups.google.com/group/microsoft.public.win32.programmer.kernel/browse_thread/thread/485840765d223a9c/9717dffc4e9747fa?lnk=st&q=GlobalMemoryStatusEx&rnum=1&hl=en#9717dffc4e9747fa
>
> Statements were made to the fact that this function returned the wrong
> numbers.
>
> I wanted to know if this has been addressed or is the function correct
> as it is ?
As far as I can tell, ullTotalPhys reports the right value. It gets this
value from the MmNumberOfPhysicalPages kernel variable, which
is always measured in small pages.
MmNumberOfPhysicalPages can be smaller than the total amount
of RAM installed, but this is probably because some areas are
reserved for use by hardware (or things like the /burnmem switch)
and are not accessible to the OS.
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
> Dunno how to get MmTotalCommittedPages in win32, maybe someone else
> does.
GetPerformanceInfo/CommitTotal is the only way I know.