diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-05-21 16:13:18 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-05-21 16:13:18 +0000 |
commit | 1f4843fbffccebc60f85b1e1a48711d4fb9ab210 (patch) | |
tree | 0742979c57093478feb748b0798bd6f5336b4fed /malloc/malloc.c | |
parent | 12e8bbff8fef7bbfbcea4ac757cd6822f8eceffb (diff) | |
download | glibc-1f4843fbffccebc60f85b1e1a48711d4fb9ab210.tar.gz glibc-1f4843fbffccebc60f85b1e1a48711d4fb9ab210.tar.xz glibc-1f4843fbffccebc60f85b1e1a48711d4fb9ab210.zip |
* malloc/hooks.c (MALLOC_STATE_VERSION): Bump.
(public_sET_STATe): If ms->version < 3, put all chunks into unsorted chunks and clear {fd,bk}_nextsize fields of largebin chunks. * malloc/malloc.c [MALLOC_DEBUG]: Revert 2007-05-13 changes. * malloc/hooks.c: Likewise. * malloc/arena.c: Likewise. * malloc/malloc.c (do_check_malloc_state): Don't assert n_mmaps is not greater than n_mmaps_max. This removes the need for the previous change. * malloc/Makefile (CFLAGS-malloc.c): Revert accidental 2007-05-07 commit.
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r-- | malloc/malloc.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index d37d920cd1..0755fd8f8d 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -2358,9 +2358,6 @@ struct malloc_par { /* Memory map support */ int n_mmaps; int n_mmaps_max; -#if MALLOC_DEBUG - int n_mmaps_cmax; -#endif int max_n_mmaps; /* the mmap_threshold is dynamic, until the user sets it manually, at which point we need to disable any @@ -2876,8 +2873,6 @@ static void do_check_malloc_state(mstate av) assert(total <= (unsigned long)(mp_.max_total_mem)); assert(mp_.n_mmaps >= 0); #endif - assert(mp_.n_mmaps <= mp_.n_mmaps_cmax); - assert(mp_.n_mmaps_max <= mp_.n_mmaps_cmax); assert(mp_.n_mmaps <= mp_.max_n_mmaps); assert((unsigned long)(av->system_mem) <= @@ -3475,13 +3470,6 @@ munmap_chunk(p) mchunkptr p; } mp_.n_mmaps--; -#if MALLOC_DEBUG - if (mp_.n_mmaps_cmax > mp_.n_mmaps_max) - { - assert (mp_.n_mmaps_cmax == mp_.n_mmaps + 1); - mp_.n_mmaps_cmax = mp_.n_mmaps; - } -#endif mp_.mmapped_mem -= total_size; int ret __attribute__ ((unused)) = munmap((char *)block, total_size); @@ -5397,9 +5385,6 @@ mstate av; size_t n_elements; size_t* sizes; int opts; Void_t* chunks[]; mp_.n_mmaps_max = 0; mem = _int_malloc(av, size); mp_.n_mmaps_max = mmx; /* reset mmap */ -#if MALLOC_DEBUG - mp_.n_mmaps_cmax = mmx; -#endif if (mem == 0) return 0; @@ -5725,17 +5710,8 @@ int mALLOPt(param_number, value) int param_number; int value; res = 0; else #endif - { -#if MALLOC_DEBUG - if (mp_.n_mmaps <= value) - mp_.n_mmaps_cmax = value; - else - mp_.n_mmaps_cmax = mp_.n_mmaps; -#endif - - mp_.n_mmaps_max = value; - mp_.no_dyn_threshold = 1; - } + mp_.n_mmaps_max = value; + mp_.no_dyn_threshold = 1; break; case M_CHECK_ACTION: |