mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00: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:
parent
983fd5c41a
commit
073f82140c
@ -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>
|
||||
|
||||
[BZ #20222]
|
||||
|
@ -4622,7 +4622,12 @@ musable (void *mem)
|
||||
return malloc_check_get_size (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))
|
||||
return chunksize (p) - SIZE_SZ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user