not overlapping with arena.
2007-05-18 Ulrich Drepper <drepper@redhat.com>
+ * malloc/malloc.c (do_check_chunk): Correct check for mmaped block
+ not overlapping with arena.
+
* malloc/mcheck.c (reallochook): If size==0, free the block.
* rt/tst-shm.c: Use fstat64 instead of fstat.
#if HAVE_MMAP
/* address is outside main heap */
if (contiguous(av) && av->top != initial_top(av)) {
- assert(((char*)p) < min_address || ((char*)p) > max_address);
+ assert(((char*)p) < min_address || ((char*)p) >= max_address);
}
/* chunk is page-aligned */
assert(((p->prev_size + sz) & (mp_.pagesize-1)) == 0);
if (size == 0)
{
freehook (ptr, caller);
- return;
+ return NULL;
}
struct hdr *hdr;