November 2007
Intermediate to advanced
848 pages
27h 15m
English
A Windows function called GlobalMemoryStatus retrieves dynamic information about the current state of memory:
VOID GlobalMemoryStatus(LPMEMORYSTATUS pmst);
I think that this function is poorly named–GlobalMemoryStatus implies that the function is somehow related to the global heaps in 16-bit Windows. I think that GlobalMemoryStatus should have been called something like VirtualMemoryStatus instead.
When you call GlobalMemoryStatus, you must pass the address of a MEMORYSTATUS structure. The MEMORYSTATUS data structure is shown here:
typedef struct _MEMORYSTATUS { DWORD dwLength; DWORD dwMemoryLoad; SIZE_T dwTotalPhys; SIZE_T dwAvailPhys; SIZE_T dwTotalPageFile; SIZE_T dwAvailPageFile; SIZE_T dwTotalVirtual; SIZE_T dwAvailVirtual; ...Read now
Unlock full access