* 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.
This commit is contained in:
Christopher Faylor
2000-09-11 00:25:57 +00:00
parent 10e1fce6a1
commit 9149d76e50
4 changed files with 29 additions and 20 deletions

View File

@ -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",