GlobalMemoryStatus

The GlobalMemoryStatus function obtains information about the computer system's current usage of both physical and virtual memory.

VOID GlobalMemoryStatus(
  LPMEMORYSTATUS lpBuffer   // pointer to the memory status structure
);
 

Parameters

lpBuffer
Pointer to a MEMORYSTATUS structure. The GlobalMemoryStatus function stores information about current memory availability into this structure.

Return Values

This function does not return a value.

Remarks

You can use the GlobalMemoryStatus function to determine how much memory your application can allocate without severely impacting other applications.

The information returned by the GlobalMemoryStatus function is volatile. There is no guarantee that two sequential calls to this function will return the same information.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winbase.h.
  Import Library: Use kernel32.lib.

See Also

Memory Management Overview, Memory Management Functions, GlobalMemoryStatusVlm, MEMORYSTATUS