mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 13:30:06 +00:00
Base max_fast on alignment, not width, of bins (Bug 24903)
set_max_fast sets the "impossibly small" value based on,
eventually, MALLOC_ALIGNMENT. The comparisons for the smallest
chunk used is, eventually, MIN_CHUNK_SIZE. Note that i386
is the only platform where these are the same, so a smallest
chunk *would* be put in a no-fastbins fastbin.
This change calculates the "impossibly small" value
based on MIN_CHUNK_SIZE instead, so that we can know it will
always be impossibly small.
(cherry picked from commit ff12e0fb91
)
This commit is contained in:
parent
91d5989356
commit
f144981490
@ -1628,7 +1628,7 @@ static INTERNAL_SIZE_T global_max_fast;
|
||||
|
||||
#define set_max_fast(s) \
|
||||
global_max_fast = (((s) == 0) \
|
||||
? SMALLBIN_WIDTH : ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK))
|
||||
? MIN_CHUNK_SIZE / 2 : ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK))
|
||||
|
||||
static inline INTERNAL_SIZE_T
|
||||
get_max_fast (void)
|
||||
|
Loading…
Reference in New Issue
Block a user