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.
This commit is contained in:
Corinna Vinschen
2019-06-04 16:58:53 +02:00
parent f03ea8e1c5
commit e1254add73
4 changed files with 20 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ details. */
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:1,
mmap_storage_high:0x070000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:true,
@@ -46,6 +47,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:1,
mmap_storage_high:0x070000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,
@@ -72,6 +74,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:2,
mmap_storage_high:0x070000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,
@@ -98,6 +101,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:2,
mmap_storage_high:0x700000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,
@@ -124,6 +128,7 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = {
wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:2,
mmap_storage_high:0x700000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,
@@ -150,6 +155,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared))
wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:2,
mmap_storage_high:0x700000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,
@@ -176,6 +182,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) =
wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:2,
mmap_storage_high:0x700000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,
@@ -202,6 +209,7 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) =
wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:2,
mmap_storage_high:0x700000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,
@@ -228,6 +236,7 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) =
wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = {
def_guard_pages:2,
mmap_storage_high:0x700000000000LL,
{
is_server:false,
needs_count_in_si_lpres2:false,