Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-06-12 17:59:17 +0400
committerCorinna Vinschen <corinna@vinschen.de>2006-06-12 17:59:17 +0400
commit730f10974a3f760650f58e01918f0deaa6ed8e79 (patch)
treedccd95a2f7b6451eaaa7f1b1109647b5cd9f7130 /winsup/cygwin/heap.cc
parent8f56da762afb4006ca63faea881ba323fe148a99 (diff)
* heap.cc (heap_init): Only commit if allocsize is not zero.
Diffstat (limited to 'winsup/cygwin/heap.cc')
-rw-r--r--winsup/cygwin/heap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
index bdf7a757f..63fc93520 100644
--- a/winsup/cygwin/heap.cc
+++ b/winsup/cygwin/heap.cc
@@ -83,7 +83,7 @@ heap_init ()
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))
+ if (allocsize && !VirtualAlloc (cygheap->user_heap.base, allocsize, MEM_COMMIT, PAGE_READWRITE))
api_fatal ("MEM_COMMIT failed, %E");
}