kernel32: GlobalMemoryStatusEx: return the size of physical memory + swapsize in ullTotalPageFile/ullAvailPageFile.

This commit is contained in:
Fabian Bieler 2007-03-15 00:21:25 +01:00 committed by Alexandre Julliard
parent 7d1ffb564f
commit e1c6c97fc5

View File

@ -1304,11 +1304,13 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
/ (lpmemex->ullTotalPhys / 100); / (lpmemex->ullTotalPhys / 100);
} }
/* Project2k refuses to start if it sees less than 1Mb of free swap */ /* Win98 returns only the swapsize in ullTotalPageFile/ullAvailPageFile,
if (lpmemex->ullTotalPageFile < lpmemex->ullTotalPhys) WinXP returns the size of physical memory + swapsize;
lpmemex->ullTotalPageFile = lpmemex->ullTotalPhys; mimic the behavior of XP.
if (lpmemex->ullAvailPageFile < lpmemex->ullAvailPhys) Note: Project2k refuses to start if it sees less than 1Mb of free swap.
lpmemex->ullAvailPageFile = lpmemex->ullAvailPhys; */
lpmemex->ullTotalPageFile += lpmemex->ullTotalPhys;
lpmemex->ullAvailPageFile += lpmemex->ullAvailPhys;
/* FIXME: should do something for other systems */ /* FIXME: should do something for other systems */
GetSystemInfo(&si); GetSystemInfo(&si);