* 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:
@ -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",
|
||||
|
Reference in New Issue
Block a user