1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +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:
Florian Weimer
2016-06-11 12:09:19 +02:00
parent 983fd5c41a
commit 073f82140c
2 changed files with 11 additions and 1 deletions

View File

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