diff options
author | Christopher Faylor <me@cgf.cx> | 2005-09-12 03:55:16 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-09-12 03:55:16 +0000 |
commit | 6772e4c9e9160919374c0597fafb8e9fa76d9ddd (patch) | |
tree | 2a4f400b1220c9dfba7f495fae1bde83f7fed0fe /winsup/cygwin/heap.cc | |
parent | 70b4d870b502b876f1709e3ced04696ad2f8c983 (diff) | |
download | cygnal-6772e4c9e9160919374c0597fafb8e9fa76d9ddd.tar.gz cygnal-6772e4c9e9160919374c0597fafb8e9fa76d9ddd.tar.bz2 cygnal-6772e4c9e9160919374c0597fafb8e9fa76d9ddd.zip |
* heap.cc (heap_init): Allocate heap from top down as a hedge against
subsequent ERROR_INVALID_ADDRESS in forked processes when CTRL-C is pressed.
Diffstat (limited to 'winsup/cygwin/heap.cc')
-rw-r--r-- | winsup/cygwin/heap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index 739b59711..7dd74979c 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -47,7 +47,7 @@ heap_init () * to assure contiguous memory. */ cygheap->user_heap.ptr = cygheap->user_heap.top = cygheap->user_heap.base = - VirtualAlloc (NULL, cygheap->user_heap.chunk, MEM_RESERVE, PAGE_NOACCESS); + VirtualAlloc (NULL, cygheap->user_heap.chunk, MEM_RESERVE | MEM_TOP_DOWN, PAGE_NOACCESS); if (cygheap->user_heap.base) break; cygheap->user_heap.chunk -= 1 * 1024 * 1024; |