aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/heap.cc5
-rw-r--r--winsup/cygwin/miscfuncs.cc11
2 files changed, 9 insertions, 7 deletions
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
index f27f81b..fa2c839 100644
--- a/winsup/cygwin/heap.cc
+++ b/winsup/cygwin/heap.cc
@@ -34,8 +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. Leave another
- 8 Gigs slack space, so lets start the heap at 0x8:00000000L. */
+ in the region from 0x4:00000000L up to 0x6:00000000L. Thread stacks
+ are located in the region from 0x6:00000000L up to 0x8:00000000L.
+ So the heap starts at 0x8:00000000L. */
uintptr_t start_address = 0x800000000L;
#else
/* Windows performs heap ASLR. This spoils the entire region below
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
{