Skip to content

Instantly share code, notes, and snippets.

@exolyte
Created February 25, 2018 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save exolyte/a7761778da953b637e33e29c26814536 to your computer and use it in GitHub Desktop.
Save exolyte/a7761778da953b637e33e29c26814536 to your computer and use it in GitHub Desktop.
wine patch to always use large address aware
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
index e68420a55b..5bb721a217 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -1417,10 +1417,7 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
/* page file sizes are not limited (Adobe Illustrator 8 depends on this) */
if (!(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE))
{
- if (lpBuffer->dwTotalPhys > MAXLONG) lpBuffer->dwTotalPhys = MAXLONG;
- if (lpBuffer->dwAvailPhys > MAXLONG) lpBuffer->dwAvailPhys = MAXLONG;
- if (lpBuffer->dwTotalVirtual > MAXLONG) lpBuffer->dwTotalVirtual = MAXLONG;
- if (lpBuffer->dwAvailVirtual > MAXLONG) lpBuffer->dwAvailVirtual = MAXLONG;
+
}
/* work around for broken photoshop 4 installer */
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index d26be98bb5..3e17ffa731 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -2440,9 +2440,7 @@ void virtual_set_large_address_space(void)
{
IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress );
- if (!(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)) return;
- /* no large address space on win9x */
- if (NtCurrentTeb()->Peb->OSPlatformId != VER_PLATFORM_WIN32_NT) return;
+
user_space_limit = working_set_limit = address_space_limit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment