about summary refs log tree commit diff
path: root/malloc/hooks.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-03-11 14:49:45 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-03-26 11:03:06 +0000
commitca89f1c7d7aa76d6f8eedadd99f6c2e9c8053714 (patch)
treee0916afa34d49e528d37c9b6d1108052a5f45f08 /malloc/hooks.c
parent4eac0ab1867c48fac13b65d997102c8aaa4447f9 (diff)
downloadglibc-ca89f1c7d7aa76d6f8eedadd99f6c2e9c8053714.tar.gz
glibc-ca89f1c7d7aa76d6f8eedadd99f6c2e9c8053714.tar.xz
glibc-ca89f1c7d7aa76d6f8eedadd99f6c2e9c8053714.zip
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>
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r--malloc/hooks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c
index e888adcdc3..c91f9502ba 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
       {