* 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

@@ -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;
}