* cygheap.cc (creturn): Correctly calculate cygheap_max.

This commit is contained in:
Christopher Faylor 2001-02-02 04:32:02 +00:00
parent b5139f598b
commit 47f810920a
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Thu Feb 1 23:08:29 2001 Christopher Faylor <cgf@cygnus.com>
* cygheap.cc (creturn): Correctly calculate cygheap_max.
Wed Jan 31 10:04:58 2001 Christopher Faylor <cgf@cygnus.com>
* shared.cc (shared_info::initialize): Reduce size of heap.

View File

@ -202,8 +202,9 @@ creturn (cygheap_types x, cygheap_entry * c, int len)
return NULL;
}
c->type = x;
if (cygheap_max < ((char *) c + len))
cygheap_max = (char *) c + len;
char *cend = ((char *) c + sizeof (*c) + len);
if (cygheap_max < cend)
cygheap_max = cend;
MALLOC_CHECK;
return (void *) c->data;
}