VOID GlobalMemoryStatus(lpms) | |||||
LPMEMORYSTATUS lpms; | /* address of memory status structure | */ |
The GlobalMemoryStatus function retrieves information about current available memory.
lpms
Points to a MEMORYSTATUS data structure that will be filled in with information about current available memory.
The MEMORYSTATUS structure has the following format:
typedef struct _MEMORYSTATUS { /* mst */
DWORD dwLength;
DWORD dwMemoryLoad;
DWORD dwTotalPhys;
DWORD dwAvailPhys;
DWORD dwTotalPageFile;
DWORD dwAvailPageFile;
DWORD dwTotalVirtual;
DWORD dwAvailVirtual;
} MEMORYSTATUS, *LPMEMORYSTATUS;
This function does not return a value.
Applications can use the function to determine how aggressive they can be about allocating memory without severely impacting other applications.
The information returned is volatile and there is no guarantee that two sequential calls to this function will return the same values.