mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
malloc_usable_size: Use correct size for dumped fake mapped chunks
The adjustment for the size computation in commit
1e8a8875d6
is needed in
malloc_usable_size, too.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2016-06-11 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* malloc/malloc.c (musable): Return correct size for dumped fake
|
||||||
|
mmapped chunk.
|
||||||
|
|
||||||
2016-06-11 Florian Weimer <fweimer@redhat.com>
|
2016-06-11 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
[BZ #20222]
|
[BZ #20222]
|
||||||
|
@ -4622,7 +4622,12 @@ musable (void *mem)
|
|||||||
return malloc_check_get_size (p);
|
return malloc_check_get_size (p);
|
||||||
|
|
||||||
if (chunk_is_mmapped (p))
|
if (chunk_is_mmapped (p))
|
||||||
return chunksize (p) - 2 * SIZE_SZ;
|
{
|
||||||
|
if (DUMPED_MAIN_ARENA_CHUNK (p))
|
||||||
|
return chunksize (p) - SIZE_SZ;
|
||||||
|
else
|
||||||
|
return chunksize (p) - 2 * SIZE_SZ;
|
||||||
|
}
|
||||||
else if (inuse (p))
|
else if (inuse (p))
|
||||||
return chunksize (p) - SIZE_SZ;
|
return chunksize (p) - SIZE_SZ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user