Rebase against 3bb824f98891e8eb907c9c652fe528373a17b10d.

This commit is contained in:
Zebediah Figura
2020-05-18 17:57:40 -05:00
parent 68f3e40ff7
commit 0a85e3f331
10 changed files with 88 additions and 74 deletions

View File

@@ -1,4 +1,4 @@
From 2c3361713f010ec03423c6eae45bacda5e7e93ac Mon Sep 17 00:00:00 2001
From 53e3f063ddc0ac0dfee0e53deffc58f818479cdd Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 25 Nov 2019 12:19:20 +0300
Subject: [PATCH] ntdll: Force bottom up allocation order for 64 bit arch
@@ -11,7 +11,7 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46568
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 0c7d6990b8c..f2e961d31c3 100644
index 170e310f34d..e90fabf614a 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1256,13 +1256,19 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -32,7 +32,7 @@ index 0c7d6990b8c..f2e961d31c3 100644
+ alloc.limit = min(alloc.limit, (void *)0x7ffffe000000);
+ }
+
if (wine_mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc, top_down ))
if (unix_funcs->mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc, top_down ))
{
ptr = alloc.result;
@@ -1272,7 +1278,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,

View File

@@ -1,4 +1,4 @@
From 3b0d0de794f903da33ce7fb4de545d0305163a31 Mon Sep 17 00:00:00 2001
From e659b08734ee7f9265736dadfe7b9a763e7ee2c6 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Tue, 14 Jan 2020 21:42:21 +0300
Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
@@ -8,7 +8,7 @@ Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
1 file changed, 55 insertions(+), 56 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index a4bc4c6ef05..18524fc12de 100644
index 167b9a7fedc..b66b7874ab7 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -577,59 +577,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
@@ -95,7 +95,7 @@ index a4bc4c6ef05..18524fc12de 100644
};
/***********************************************************************
@@ -1178,6 +1128,41 @@ static int alloc_reserved_area_callback( void *start, size_t size, void *arg )
@@ -1178,6 +1128,41 @@ static int CDECL alloc_reserved_area_callback( void *start, SIZE_T size, void *a
return 0;
}
@@ -160,7 +160,7 @@ index a4bc4c6ef05..18524fc12de 100644
goto done;
}
@@ -1955,6 +1942,12 @@ static int alloc_virtual_heap( void *base, size_t size, void *arg )
@@ -1956,6 +1943,12 @@ static int CDECL alloc_virtual_heap( void *base, SIZE_T size, void *arg )
return (alloc->base != (void *)-1);
}
@@ -173,9 +173,9 @@ index a4bc4c6ef05..18524fc12de 100644
/***********************************************************************
* virtual_init
*/
@@ -2020,6 +2013,9 @@ void virtual_init(void)
@@ -2021,6 +2014,9 @@ void virtual_init(void)
size = (char *)address_space_start - (char *)0x10000;
if (size && wine_mmap_is_in_reserved_area( (void*)0x10000, size ) == 1)
if (size && unix_funcs->mmap_is_in_reserved_area( (void*)0x10000, size ) == 1)
wine_anon_mmap( (void *)0x10000, size, PROT_READ | PROT_WRITE, MAP_FIXED );
+
+ wine_mmap_add_free_area(address_space_start, (char *)user_space_limit - (char *)address_space_start);
@@ -183,7 +183,7 @@ index a4bc4c6ef05..18524fc12de 100644
}
@@ -2791,6 +2787,9 @@ void virtual_set_large_address_space(void)
@@ -2792,6 +2788,9 @@ void virtual_set_large_address_space(void)
/* no large address space on win9x */
if (NtCurrentTeb()->Peb->OSPlatformId != VER_PLATFORM_WIN32_NT) return;