Alexandre Julliard : ntdll: Don' t free low address space for large address aware applications.

Alexandre Julliard julliard at winehq.org
Wed Aug 5 09:48:04 CDT 2009


Module: wine
Branch: master
Commit: c10bdbefd69786846b035d1c38de3052bed67875
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c10bdbefd69786846b035d1c38de3052bed67875

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Aug  5 11:23:02 2009 +0200

ntdll: Don't free low address space for large address aware applications.

Many games set the LARGE_ADDRESS_AWARE flag but don't pass the
appropriate flags to d3dx9 to make it cope with it.

---

 dlls/ntdll/virtual.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 04c90f6..62176e4 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1681,12 +1681,6 @@ void virtual_release_address_space( BOOL free_high_mem )
 
     server_enter_uninterrupted_section( &csVirtual, &sigset );
 
-#ifndef __APPLE__  /* dyld doesn't support parts of the WINE_DOS segment being unmapped */
-    range.base  = (char *)0x20000000;
-    range.limit = (char *)0x7f000000;
-    while (wine_mmap_enum_reserved_areas( free_reserved_memory, &range, 0 )) /* nothing */;
-#endif
-
     /* no large address space on win9x */
     if (free_high_mem && NtCurrentTeb()->Peb->OSPlatformId == VER_PLATFORM_WIN32_NT)
     {
@@ -1695,6 +1689,15 @@ void virtual_release_address_space( BOOL free_high_mem )
         while (wine_mmap_enum_reserved_areas( free_reserved_memory, &range, 1 )) /* nothing */;
         user_space_limit = working_set_limit = address_space_limit;
     }
+    else
+    {
+#ifndef __APPLE__  /* dyld doesn't support parts of the WINE_DOS segment being unmapped */
+        range.base  = (char *)0x20000000;
+        range.limit = (char *)0x7f000000;
+        while (wine_mmap_enum_reserved_areas( free_reserved_memory, &range, 0 )) /* nothing */;
+#endif
+    }
+
     server_leave_uninterrupted_section( &csVirtual, &sigset );
 #endif
 }




More information about the wine-cvs mailing list