Skip to content

Commit

Permalink
[BZ #3313]
Browse files Browse the repository at this point in the history
	* malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to
	determine highest fast bin to consolidate, always look into all of
	them.
	(do_check_malloc_state): Only require for empty bins for large
	sizes in main arena.
  • Loading branch information
Ulrich Drepper committed Oct 13, 2006
1 parent dbc3d56 commit cc7eecb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
2006-10-13 Ulrich Drepper <drepper@redhat.com>

* malloc/malloc.c (do_check_malloc_state): Only require for empty
bins for large sizes in main arena.
[BZ #3313]
* malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to
determine highest fast bin to consolidate, always look into all of
them.
(do_check_malloc_state): Only require for empty bins for large
sizes in main arena.

* libio/stdio.h: Add more __wur attributes.

Expand Down
8 changes: 8 additions & 0 deletions malloc/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4692,7 +4692,15 @@ static void malloc_consolidate(av) mstate av;
reused anyway.
*/

#if 0
/* It is wrong to limit the fast bins to search using get_max_fast
because, except for the main arena, all the others might have
blocks in the high fast bins. It's not worth it anyway, just
search all bins all the time. */
maxfb = &(av->fastbins[fastbin_index(get_max_fast ())]);
#else
maxfb = &(av->fastbins[NFASTBINS]);
#endif
fb = &(av->fastbins[0]);
do {
if ( (p = *fb) != 0) {
Expand Down

0 comments on commit cc7eecb

Please sign in to comment.