Skip to content

Latest commit

 

History

History
107 lines (81 loc) · 3.87 KB

nf-winbase-globalmemorystatus.md

File metadata and controls

107 lines (81 loc) · 3.87 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winbase.GlobalMemoryStatus
GlobalMemoryStatus function (winbase.h)
Retrieves information about the system's current usage of both physical and virtual memory. (GlobalMemoryStatus)
GlobalMemoryStatus
GlobalMemoryStatus function
_win32_globalmemorystatus
base.globalmemorystatus
winbase/GlobalMemoryStatus
base\globalmemorystatus.htm
base
473e4172-b57a-4fc6-9bb2-e916ac3c9a2f
12/05/2018
GlobalMemoryStatus, GlobalMemoryStatus function, _win32_globalmemorystatus, base.globalmemorystatus, winbase/GlobalMemoryStatus
winbase.h
Windows.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Kernel32.lib
Kernel32.dll
Windows
19H1
GlobalMemoryStatus
winbase/GlobalMemoryStatus
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-Kernel32-Legacy-l1-1-0.dll
kernel32legacy.dll
API-MS-Win-Core-Kernel32-Legacy-l1-1-1.dll
API-MS-Win-Core-Kernel32-Legacy-l1-1-2.dll
API-MS-Win-DownLevel-Kernel32-l2-1-0.dll
API-MS-Win-Core-Kernel32-Legacy-L1-1-3.dll
API-MS-Win-Core-Kernel32-Legacy-L1-1-4.dll
API-MS-Win-Core-Kernel32-Legacy-L1-1-5.dll
GlobalMemoryStatus

GlobalMemoryStatus function

-description

[GlobalMemoryStatus can return incorrect information. Use the GlobalMemoryStatusEx function instead.]

Retrieves information about the system's current usage of both physical and virtual memory.

-parameters

-param lpBuffer [out]

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

-remarks

On computers with more than 4 GB of memory, the GlobalMemoryStatus function can return incorrect information, reporting a value of –1 to indicate an overflow. For this reason, applications should use the GlobalMemoryStatusEx function instead.

On Intel x86 computers with more than 2 GB and less than 4 GB of memory, the GlobalMemoryStatus function will always return 2 GB in the dwTotalPhys member of the MEMORYSTATUS structure. Similarly, if the total available memory is between 2 and 4 GB, the dwAvailPhys member of the MEMORYSTATUS structure will be rounded down to 2 GB. If the executable is linked using the /LARGEADDRESSAWARE linker option, then the GlobalMemoryStatus function will return the correct amount of physical memory in both members.

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.

-see-also

GlobalMemoryStatusEx

MEMORYSTATUS

Memory Management Functions

Memory Performance Information

Virtual Address Space and Physical Storage