diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-05-03 15:10:24 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-05-03 15:10:24 +0200 |
commit | 28970dae34522059e094eb7db466404facb09460 (patch) | |
tree | 557c7032eba528dfba1e7e083a0f523a9a45c79f /winsup/cygwin/miscfuncs.cc | |
parent | b827d4d36a7df77e8e0bcaed38bf639d83f6d233 (diff) | |
download | newlib-28970dae34522059e094eb7db466404facb09460.zip newlib-28970dae34522059e094eb7db466404facb09460.tar.gz newlib-28970dae34522059e094eb7db466404facb09460.tar.bz2 |
Cygwin: move x86_64 thread stack area
The x86_64 thread stack area collides with the share user data in
recent versions of Windows. Let's get ourselvels get out of the
way and move the thread stack area in the former slack space
between DLL area and heap, from 0x6:00000000 to 0x8:00000000.
That quadruplicates the stack area, so allow bigger maximum stack
sizes.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r-- | winsup/cygwin/miscfuncs.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 905c242..4a5db6f 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -513,13 +513,14 @@ pthread_wrapper (PVOID arg) } #ifdef __x86_64__ -/* The memory region used for thread stacks */ -#define THREAD_STORAGE_LOW 0x080000000L -#define THREAD_STORAGE_HIGH 0x100000000L +/* The memory region used for thread stacks. The memory layout is outlined + in heap.cc, function eval_start_address(). */ +#define THREAD_STORAGE_LOW 0x600000000L +#define THREAD_STORAGE_HIGH 0x800000000L /* We provide the stacks always in 1 Megabyte slots */ -#define THREAD_STACK_SLOT 0x100000L /* 1 Meg */ +#define THREAD_STACK_SLOT 0x000100000L /* 1 Meg */ /* Maximum stack size returned from the pool. */ -#define THREAD_STACK_MAX 0x10000000L /* 256 Megs */ +#define THREAD_STACK_MAX 0x040000000L /* 1 Gig */ class thread_allocator { |