diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2019-06-04 17:58:53 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-06-04 17:58:53 +0300 |
commit | e1254add73b1fb834933b38a5163d72c30c2330b (patch) | |
tree | 7300bbc2ecb13ad6edb9cdf31485cd1c5685c6ad /winsup/cygwin/heap.cc | |
parent | f03ea8e1c57bd5cea83f6cd47fa02870bdfeb1c5 (diff) |
Cygwin: Allow accessing 48 bit address space in Windows 8.1 or later
64 bit Windows started out with a 44 bit address space due to a
restriction of the AMD64 CPUs at the time. Starting with Windows
8.1, these CPUs are not supported anymore and Windows switched to
the full 48 bit address space supported by AMD64.
Cygwin didn't follow suit yet so mmaps are still restricted to
the lower 44 bit address space. Fix that by using a system-specific
upper address for mmap allocations, 44 bit up to Windows 8, 48 bit
starting with Windows 8.1.
While at it, move the heap by another 8 Gigs to leave some space
for a potential extension of DLL address space, and restrict the
mmap lower address so the heap can grow to 32 Gigs before colliding
with mmaps.
Diffstat (limited to 'winsup/cygwin/heap.cc')
-rw-r--r-- | winsup/cygwin/heap.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index e18cd5508..b839c8cd4 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -34,9 +34,9 @@ eval_start_address () executable starts at 0x1:00400000L, the Cygwin DLL starts at 0x1:80040000L, other rebased DLLs are located in the region from 0x2:00000000L up to 0x4:00000000L, -auto-image-based DLLs are located - in the region from 0x4:00000000L up to 0x6:00000000L. - So we let the heap start at 0x6:00000000L. */ - uintptr_t start_address = 0x600000000L; + in the region from 0x4:00000000L up to 0x6:00000000L. Leave another + 8 Gigs slack space, so lets start the heap at 0x8:00000000L. */ + uintptr_t start_address = 0x800000000L; #else /* Windows performs heap ASLR. This spoils the entire region below 0x20000000 for us, because that region is used by Windows to randomize |