mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Correctly implement M_MXFAST.
* malloc/malloc.c (struct malloc_state): Replace max_fast with flags fields. (global_max_fast): New variable. (set_max_fast): Change to not require arena parameter and to modify global_max_fast. Change all callers. (get_max_fast): New macro. Use this instead of directly accessing now removed max_fast arena member. (have_fastchunks): Use flags instead of max_fast. (clear_fastchunks): Likewise. (set_fastchunks): Likewise. (contiguous): Likewise. (noncontiguous): Likewise. (set_noncontiguous): Likewise. (set_contiguous): Likewise. (malloc_init_state): Explicitly set FASTCHUNKS_BIT. Call set_max_fast only for main arena. * malloc/hooks.c (public_sET_STATe): Adjust set_max_fast use.
This commit is contained in:
@@ -584,7 +584,7 @@ public_sET_STATe(Void_t* msptr)
|
||||
(void)mutex_lock(&main_arena.mutex);
|
||||
/* There are no fastchunks. */
|
||||
clear_fastchunks(&main_arena);
|
||||
set_max_fast(&main_arena, DEFAULT_MXFAST);
|
||||
set_max_fast(DEFAULT_MXFAST);
|
||||
for (i=0; i<NFASTBINS; ++i)
|
||||
main_arena.fastbins[i] = 0;
|
||||
for (i=0; i<BINMAPSIZE; ++i)
|
||||
|
Reference in New Issue
Block a user