Module: wine Branch: master Commit: 5468e37508661ab0740f0066f9e1d4eaaca78cbd URL: http://source.winehq.org/git/wine.git/?a=commit;h=5468e37508661ab0740f0066f9...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Dec 1 21:02:19 2015 +0900
kernel32: Also check OS version to detect old binaries in GlobalMemoryStatus.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/heap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c index 0c05de6..eeed785 100644 --- a/dlls/kernel32/heap.c +++ b/dlls/kernel32/heap.c @@ -1436,7 +1436,8 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer ) lpBuffer->dwAvailPageFile = 2U*1024*1024*1024 - lpBuffer->dwAvailPhys - 1;
/* limit page file size for really old binaries */ - if (nt->OptionalHeader.MajorSubsystemVersion < 4) + if (nt->OptionalHeader.MajorSubsystemVersion < 4 || + nt->OptionalHeader.MajorOperatingSystemVersion < 4) { if (lpBuffer->dwTotalPageFile > MAXLONG) lpBuffer->dwTotalPageFile = MAXLONG; if (lpBuffer->dwAvailPageFile > MAXLONG) lpBuffer->dwAvailPageFile = MAXLONG;