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:
authorChristopher Faylor <me@cgf.cx>2001-09-14 01:15:34 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-14 01:15:34 +0400
commit3e2d8af0b9a8df7b9b1230d35f3e838d3efbfb33 (patch)
tree3c5fec8214d68de8539f658988be8b1257322e26
parent7a2afbbb855e8b96234fd78b22698d028e785ea6 (diff)
* cygheap.cc (ccalloc): Pass correct length to creturn so that cygheap_max is
correctly calculated.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/cygheap.cc5
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2ea596506..8217be643 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep 13 17:14:59 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * cygheap.cc (ccalloc): Pass correct length to creturn so that
+ cygheap_max is correctly calculated.
+
Wed Sep 12 21:06:38 2001 Christopher Faylor <cgf@cygnus.com>
* sync.cc (muto::acquire): Fix while/if typo.
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 42127eeff..4866a7e8d 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -315,9 +315,10 @@ ccalloc (cygheap_types x, DWORD n, DWORD size)
{
cygheap_entry *c;
MALLOC_CHECK;
- c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n * size));
+ n *= size;
+ c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
if (c)
- memset (c->data, 0, n * size);
+ memset (c->data, 0, n);
if (!c)
system_printf ("ccalloc returned NULL");
return creturn (x, c, n);