From 730f10974a3f760650f58e01918f0deaa6ed8e79 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 12 Jun 2006 13:59:17 +0000 Subject: [PATCH] * heap.cc (heap_init): Only commit if allocsize is not zero. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/heap.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 288d214d8..b9eabbb22 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2006-06-12 Pierre Humblet Pierre.Humblet@ieee.org + + * heap.cc (heap_init): Only commit if allocsize is not zero. + 2006-06-12 Corinna Vinschen * net.cc (fdsock): Disable raising buffer sizes. Add comment to 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"); } -- 2.43.5