From cd86c1481ad7356a7bbcd14549e938769f474fd6 Mon Sep 17 00:00:00 2001 From: Dave Watson Date: Wed, 24 Feb 2016 11:02:49 -0800 Subject: [PATCH] Fix arena_run_first_best_fit Merge of 3417a304ccde61ac1f68b436ec22c03f1d6824ec looks like a small bug: first_best_fit doesn't scan through all the classes, since ind is offset from runs_avail_nclasses by run_avail_bias. --- src/arena.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arena.c b/src/arena.c index 987e2064..3b125b05 100644 --- a/src/arena.c +++ b/src/arena.c @@ -1079,7 +1079,7 @@ arena_run_first_best_fit(arena_t *arena, size_t size) szind_t ind, i; ind = size2index(run_quantize_ceil(size)); - for (i = ind; i < runs_avail_nclasses; i++) { + for (i = ind; i < runs_avail_nclasses + runs_avail_bias; i++) { arena_chunk_map_misc_t *miscelm = arena_run_tree_first( arena_runs_avail_get(arena, i)); if (miscelm != NULL)