diff options
author | Christopher Faylor <me@cgf.cx> | 2005-12-26 19:34:59 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-12-26 19:34:59 +0000 |
commit | a16b738dd53486a3a65a28519129ebd060a02db9 (patch) | |
tree | 997fdb3185d3f3e8e83524e53a7578bd63aef357 /winsup/cygwin/heap.cc | |
parent | c675040a068e107e8628b8e29efd975b1162dc66 (diff) | |
download | cygnal-a16b738dd53486a3a65a28519129ebd060a02db9.tar.gz cygnal-a16b738dd53486a3a65a28519129ebd060a02db9.tar.bz2 cygnal-a16b738dd53486a3a65a28519129ebd060a02db9.zip |
* dcrt0.cc (__api_fatal): Simplify to just use strace mechamisms.
(do_exit): Move minimal_printf...
* pinfo.cc (pinfo::exit): ...into here.
* strace.cc (strace::vprntf): Guarantee output to the console when
system_printf/api_fatal.
* heap.cc (heap_init): Wait a second before issuing an error when
ERROR_INVALID_ADDRESS since this is probably due to a CTRL-C handler sneaking
in, using the memory that we want to use for the heap, and, eventually exiting.
Diffstat (limited to 'winsup/cygwin/heap.cc')
-rw-r--r-- | winsup/cygwin/heap.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index b45019981..3f6becf76 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -76,10 +76,14 @@ heap_init () break; } if (!p) - api_fatal ("couldn't allocate heap, %E, base %p, top %p, " - "reserve_size %d, allocsize %d, page_const %d", - cygheap->user_heap.base, cygheap->user_heap.top, - reserve_size, allocsize, page_const); + { + if (GetLastError () == ERROR_INVALID_ADDRESS) + Sleep (2000); + api_fatal ("couldn't allocate heap, %E, base %p, top %p, " + "reserve_size %d, allocsize %d, page_const %d", + cygheap->user_heap.base, cygheap->user_heap.top, + reserve_size, allocsize, page_const); + } if (p != cygheap->user_heap.base) api_fatal ("heap allocated at wrong address %p (mapped) != %p (expected)", p, cygheap->user_heap.base); if (!VirtualAlloc (cygheap->user_heap.base, allocsize, MEM_COMMIT, PAGE_READWRITE)) |