Commit e1c6c97f authored by Fabian Bieler's avatar Fabian Bieler Committed by Alexandre Julliard

kernel32: GlobalMemoryStatusEx: return the size of physical memory + swapsize in…

kernel32: GlobalMemoryStatusEx: return the size of physical memory + swapsize in ullTotalPageFile/ullAvailPageFile.
parent 7d1ffb56
......@@ -1304,11 +1304,13 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
/ (lpmemex->ullTotalPhys / 100);
}
/* Project2k refuses to start if it sees less than 1Mb of free swap */
if (lpmemex->ullTotalPageFile < lpmemex->ullTotalPhys)
lpmemex->ullTotalPageFile = lpmemex->ullTotalPhys;
if (lpmemex->ullAvailPageFile < lpmemex->ullAvailPhys)
lpmemex->ullAvailPageFile = lpmemex->ullAvailPhys;
/* Win98 returns only the swapsize in ullTotalPageFile/ullAvailPageFile,
WinXP returns the size of physical memory + swapsize;
mimic the behavior of XP.
Note: Project2k refuses to start if it sees less than 1Mb of free swap.
*/
lpmemex->ullTotalPageFile += lpmemex->ullTotalPhys;
lpmemex->ullAvailPageFile += lpmemex->ullAvailPhys;
/* FIXME: should do something for other systems */
GetSystemInfo(&si);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment