diff options
author | Christopher Faylor <me@cgf.cx> | 2000-09-11 00:25:57 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-09-11 00:25:57 +0000 |
commit | 9149d76e50da76800d4394b1c8a7478ceeed94fa (patch) | |
tree | 28f08de5572be452a045fb48f73fdf8861c1fa90 /winsup/cygwin/cygheap.cc | |
parent | 10e1fce6a1122737578402681e0a522da6dfa7f2 (diff) | |
download | newlib-9149d76e50da76800d4394b1c8a7478ceeed94fa.zip newlib-9149d76e50da76800d4394b1c8a7478ceeed94fa.tar.gz newlib-9149d76e50da76800d4394b1c8a7478ceeed94fa.tar.bz2 |
* cygheap.cc (init_cheap): Just use any old address for the cygwin heap.
* exceptions.cc (signal_exit): Don't terminate the main thread. Just try to
exit in this thread really quickly.
* signal.cc (kill_pgrp): Fix typo which caused pinfo structure to be assigned
incorrectly.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 09bd680..d8e1333 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -16,13 +16,13 @@ #include "heap.h" #include "cygerrno.h" -#define HEAP_START ((void *) 0x12010000) inline static void init_cheap () { - if (!VirtualAlloc (HEAP_START, CYGHEAPSIZE, MEM_RESERVE, PAGE_NOACCESS)) - api_fatal ("Couldn't reserve space for child's heap, %E"); - cygheap = cygheap_max = HEAP_START; + cygheap = VirtualAlloc (NULL, CYGHEAPSIZE, MEM_RESERVE, PAGE_NOACCESS); + if (!cygheap) + api_fatal ("Couldn't reserve space for cygwin's heap, %E"); + cygheap_max = cygheap; } #define pagetrunc(x) ((void *) (((DWORD) (x)) & ~(4096 - 1))) @@ -155,7 +155,7 @@ cygheap_fixup_in_child (HANDLE parent) DWORD m, n; n = (DWORD) cygheap_max - (DWORD) cygheap; if (!VirtualAlloc (cygheap, CYGHEAPSIZE, MEM_RESERVE, PAGE_NOACCESS)) - api_fatal ("Couldn't reserve space for child's heap, %E"); + api_fatal ("Couldn't reserve space for cygwin's heap in child, %E"); if (!VirtualAlloc (cygheap, n, MEM_COMMIT, PAGE_READWRITE)) api_fatal ("Couldn't allocate space for child's heap %p, size %d, %E", |