1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

malloc: Rename chunk2rawmem

The previous patch ensured that all chunk to mem computations use
chunk2rawmem, so now we can rename it to chunk2mem, and in the few
cases where the tag of mem is relevant chunk2mem_tag can be used.

Replaced tag_at (chunk2rawmem (x)) with chunk2mem_tag (x).
Renamed chunk2rawmem to chunk2mem.

Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
Szabolcs Nagy
2021-03-11 14:49:45 +00:00
parent 4eac0ab186
commit ca89f1c7d7
2 changed files with 43 additions and 43 deletions

View File

@ -279,7 +279,7 @@ free_check (void *mem, const void *caller)
else
{
/* Mark the chunk as belonging to the library again. */
(void)tag_region (chunk2rawmem (p), memsize (p));
(void)tag_region (chunk2mem (p), memsize (p));
_int_free (&main_arena, p, 1);
__libc_lock_unlock (main_arena.mutex);
}
@ -330,7 +330,7 @@ realloc_check (void *oldmem, size_t bytes, const void *caller)
#if HAVE_MREMAP
mchunkptr newp = mremap_chunk (oldp, chnb);
if (newp)
newmem = tag_at (chunk2rawmem (newp));
newmem = chunk2mem_tag (newp);
else
#endif
{