GlobalMemoryStatusEx Does Not Compute ullAvailPageFile Correctly Under Low Memory Conditions (277021)
The information in this article applies to:
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional
- Microsoft Platform Software Development Kit (SDK) 1.0
This article was previously published under Q277021 SYMPTOMS
Programs that use the GlobalMemoryStatusEx memory management function may return incorrect data for an ullAvailPageFile member of the MEMORYSTATUSEX structure (the space that is available in the paging file) when a low memory condition exists for an extended period of time. Because of this, the program may display incorrect pagefile data, or incorrectly interpret whether or not the computer is in a low memory state.
CAUSE
This problem can occur because the implementation of GlobalMemoryStatusEx could incorrectly assign the value of ullAvailPageFile to become larger than ullTotalPageFile when a low memory condition exists for an extended period of time.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
260910 How to Obtain the Latest Windows 2000 Service Pack
WORKAROUND
To work around this problem if you are developing a program and you want to test for a low memory situation on computers before you apply Windows 2000 Service Pack 2, you could use the following code:
if ( MemoryStatus.ullAvailPageFile > MemoryStatus.ullTotalPageFile )
{
//
// Assume we are in the low memory state.
//
LowMemory = TRUE;
}
STATUSMicrosoft has confirmed that this is a problem in Microsoft Windows 2000.
This problem was first corrected in Windows 2000 Service Pack 2.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbbug kbenv kbfix kbWin2000PreSP2Fix KB277021 |
---|
|