diff options
author | Christopher Faylor <me@cgf.cx> | 2001-09-13 21:15:34 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-09-13 21:15:34 +0000 |
commit | 3e2d8af0b9a8df7b9b1230d35f3e838d3efbfb33 (patch) | |
tree | 3c5fec8214d68de8539f658988be8b1257322e26 /winsup/cygwin/cygheap.cc | |
parent | 7a2afbbb855e8b96234fd78b22698d028e785ea6 (diff) | |
download | newlib-3e2d8af0b9a8df7b9b1230d35f3e838d3efbfb33.zip newlib-3e2d8af0b9a8df7b9b1230d35f3e838d3efbfb33.tar.gz newlib-3e2d8af0b9a8df7b9b1230d35f3e838d3efbfb33.tar.bz2 |
* cygheap.cc (ccalloc): Pass correct length to creturn so that cygheap_max is
correctly calculated.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 42127ee..4866a7e 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); |