aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/cygheap.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-09-11 00:25:57 +0000
committerChristopher Faylor <me@cgf.cx>2000-09-11 00:25:57 +0000
commit9149d76e50da76800d4394b1c8a7478ceeed94fa (patch)
tree28f08de5572be452a045fb48f73fdf8861c1fa90 /winsup/cygwin/cygheap.cc
parent10e1fce6a1122737578402681e0a522da6dfa7f2 (diff)
downloadnewlib-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.cc10
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",