* cygheap.cc (ccalloc): Pass correct length to creturn so that cygheap_max is

correctly calculated.
This commit is contained in:
Christopher Faylor 2001-09-13 21:15:34 +00:00
parent 7a2afbbb85
commit 3e2d8af0b9
2 changed files with 8 additions and 2 deletions

View File

@ -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> Wed Sep 12 21:06:38 2001 Christopher Faylor <cgf@cygnus.com>
* sync.cc (muto::acquire): Fix while/if typo. * sync.cc (muto::acquire): Fix while/if typo.

View File

@ -315,9 +315,10 @@ ccalloc (cygheap_types x, DWORD n, DWORD size)
{ {
cygheap_entry *c; cygheap_entry *c;
MALLOC_CHECK; MALLOC_CHECK;
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n * size)); n *= size;
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
if (c) if (c)
memset (c->data, 0, n * size); memset (c->data, 0, n);
if (!c) if (!c)
system_printf ("ccalloc returned NULL"); system_printf ("ccalloc returned NULL");
return creturn (x, c, n); return creturn (x, c, n);