mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
kernel32: Limit dwTotalPageFile in GlobalMemoryStatus to 4Gb minus 512kb for apps that do not expect so much memory.
This commit is contained in:
parent
43d208d215
commit
d8822cf3d2
@ -1305,7 +1305,7 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
|
||||
* roughly how much they are able to allocate
|
||||
*
|
||||
* RETURNS
|
||||
* None
|
||||
* None
|
||||
*/
|
||||
VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
|
||||
{
|
||||
@ -1333,13 +1333,14 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
|
||||
{
|
||||
lpBuffer->dwTotalPhys = min( memstatus.ullTotalPhys, 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->dwTotalVirtual = min( memstatus.ullTotalVirtual, MAXDWORD );
|
||||
lpBuffer->dwAvailVirtual = min( memstatus.ullAvailVirtual, MAXDWORD );
|
||||
|
||||
}
|
||||
else /* duplicate NT bug */
|
||||
else /* duplicate NT bug */
|
||||
{
|
||||
lpBuffer->dwTotalPhys = memstatus.ullTotalPhys;
|
||||
lpBuffer->dwAvailPhys = memstatus.ullAvailPhys;
|
||||
|
Loading…
Reference in New Issue
Block a user