1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

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>
This commit is contained in:
Szabolcs Nagy
2021-02-08 12:39:01 +00:00
parent 9d61722b59
commit 63a20eb03c
2 changed files with 14 additions and 21 deletions

View File

@ -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