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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user