about summary refs log tree commit diff
path: root/malloc/arena.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-02-08 12:39:01 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-03-26 11:03:06 +0000
commit63a20eb03c0c363cf5271eb3a2fa0bb7552c01be (patch)
tree5dd3dc10e1f41c5d2e12f919d916f3b9244293ee /malloc/arena.c
parent9d61722b599a02a6d3caed1d75417a7f5e661693 (diff)
downloadglibc-63a20eb03c0c363cf5271eb3a2fa0bb7552c01be.tar.gz
glibc-63a20eb03c0c363cf5271eb3a2fa0bb7552c01be.tar.xz
glibc-63a20eb03c0c363cf5271eb3a2fa0bb7552c01be.zip
malloc: Use branches instead of mtag_granule_mask
The branches may be better optimized since mtag_enabled is widely used.

Granule size larger than a chunk header is not supported since then we
cannot have both the chunk header and user area granule aligned.  To
fix that for targets with large granule, the chunk layout has to change.

So code that attempted to handle the granule mask generally was changed.
This simplified CHUNK_AVAILABLE_SIZE and the logic in malloc_usable_size.

Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'malloc/arena.c')
-rw-r--r--malloc/arena.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 1e83bb66bd..9fbbb38a15 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -306,7 +306,6 @@ ptmalloc_init (void)
 
       mtag_enabled = true;
       mtag_mmap_flags = __MTAG_MMAP_FLAGS;
-      mtag_granule_mask = ~(size_t)(__MTAG_GRANULE_SIZE - 1);
     }
 #endif