|
|
- Original patch code by Valve Corporation
-
- Original commits:
- https://github.com/ValveSoftware/wine/commit/62c9478e4768e94e841da2ef75eb778ed346e3ab
-
- LICENSE: See https://github.com/ValveSoftware/wine
-
- Target Wine version of this patch file:
- Wine 4.9 (Vanilla/Non-staging)
-
- --- a/dlls/kernel32/heap.c
- +++ b/dlls/kernel32/heap.c
- @@ -75,6 +75,7 @@ WINE_DECLARE_DEBUG_CHANNEL(globalmem);
-
- static HANDLE systemHeap; /* globally shared heap */
-
- +extern BOOL CDECL __wine_needs_override_large_address_aware(void);
-
- /***********************************************************************
- * HEAP_CreateSystemHeap
- @@ -1375,6 +1376,10 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORY
- MEMORYSTATUSEX memstatus;
- OSVERSIONINFOW osver;
- IMAGE_NT_HEADERS *nt = RtlImageNtHeader( GetModuleHandleW(0) );
- + static int force_large_address_aware = -1;
- +
- + if (force_large_address_aware == -1)
- + force_large_address_aware = __wine_needs_override_large_address_aware();
-
- /* Because GlobalMemoryStatus is identical to GlobalMemoryStatusEX save
- for one extra field in the struct, and the lack of a bug, we simply
- @@ -1415,7 +1420,8 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORY
-
- /* values are limited to 2Gb unless the app has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag */
- /* page file sizes are not limited (Adobe Illustrator 8 depends on this) */
- - if (!(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE))
- + if (!(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE) &&
- + !force_large_address_aware)
- {
- if (lpBuffer->dwTotalPhys > MAXLONG) lpBuffer->dwTotalPhys = MAXLONG;
- if (lpBuffer->dwAvailPhys > MAXLONG) lpBuffer->dwAvailPhys = MAXLONG;
|