diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-10-12 20:18:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-10-12 20:18:07 +0000 |
commit | 9bf248c6c6290a2a8a729f10f1d94258868a0650 (patch) | |
tree | ec69ec2f7beec012e14ff49a37f359e27ce402c6 /malloc/hooks.c | |
parent | 30047d19ee25db7e116a24ceaba9c19af20404bc (diff) | |
download | glibc-9bf248c6c6290a2a8a729f10f1d94258868a0650.zip glibc-9bf248c6c6290a2a8a729f10f1d94258868a0650.tar.gz glibc-9bf248c6c6290a2a8a729f10f1d94258868a0650.tar.bz2 |
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.
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r-- | malloc/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c index 0f8f274..5dd2d65 100644 --- a/malloc/hooks.c +++ b/malloc/hooks.c @@ -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) |