Commit d8822cf3 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

kernel32: Limit dwTotalPageFile in GlobalMemoryStatus to 4Gb minus 512kb for…

kernel32: Limit dwTotalPageFile in GlobalMemoryStatus to 4Gb minus 512kb for apps that do not expect so much memory.
parent 43d208d2
...@@ -1333,7 +1333,8 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer ) ...@@ -1333,7 +1333,8 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
{ {
lpBuffer->dwTotalPhys = min( memstatus.ullTotalPhys, MAXDWORD ); lpBuffer->dwTotalPhys = min( memstatus.ullTotalPhys, MAXDWORD );
lpBuffer->dwAvailPhys = min( memstatus.ullAvailPhys, MAXDWORD ); lpBuffer->dwAvailPhys = min( memstatus.ullAvailPhys, MAXDWORD );
lpBuffer->dwTotalPageFile = min( memstatus.ullTotalPageFile, MAXDWORD ); /* Limit value for apps that do not expect so much memory. Remove last 512 kb to make Sacrifice demo happy. */
lpBuffer->dwTotalPageFile = min( memstatus.ullTotalPageFile, 0xfff7ffff );
lpBuffer->dwAvailPageFile = min( memstatus.ullAvailPageFile, MAXDWORD ); lpBuffer->dwAvailPageFile = min( memstatus.ullAvailPageFile, MAXDWORD );
lpBuffer->dwTotalVirtual = min( memstatus.ullTotalVirtual, MAXDWORD ); lpBuffer->dwTotalVirtual = min( memstatus.ullTotalVirtual, MAXDWORD );
lpBuffer->dwAvailVirtual = min( memstatus.ullAvailVirtual, MAXDWORD ); lpBuffer->dwAvailVirtual = min( memstatus.ullAvailVirtual, MAXDWORD );
......
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