malloc: Use memsize instead of CHUNK_AVAILABLE_SIZE
commitfaf003ed8de7c1b1b4794ae15c90241825caeea4
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 8 Mar 2021 12:59:05 +0000 (8 12:59 +0000)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 26 Mar 2021 11:03:06 +0000 (26 11:03 +0000)
tree2c89de8148b9810ebd8c0b7471ef6aa23dc41db8
parent1dc17ea8f8492d618a91f0b7b3f1e7fd089889d1
malloc: Use memsize instead of CHUNK_AVAILABLE_SIZE

This is a pure refactoring change that does not affect behaviour.

The CHUNK_AVAILABLE_SIZE name was unclear, the memsize name tries to
follow the existing convention of mem denoting the allocation that is
handed out to the user, while chunk is its internally used container.

The user owned memory for a given chunk starts at chunk2mem(p) and
the size is memsize(p).  It is not valid to use on dumped heap chunks.

Moved the definition next to other chunk and mem related macros.

Reviewed-by: DJ Delorie <dj@redhat.com>
malloc/hooks.c
malloc/malloc.c