From ca89f1c7d7aa76d6f8eedadd99f6c2e9c8053714 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 11 Mar 2021 14:49:45 +0000 Subject: 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 --- malloc/hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'malloc/hooks.c') diff --git a/malloc/hooks.c b/malloc/hooks.c index e888adc..c91f950 100644 --- a/malloc/hooks.c +++ b/malloc/hooks.c @@ -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 { -- cgit v1.1