Use extent_heap_first for best fit.

extent_heap_any makes the layout less predictable and as a result incurs more
fragmentation.
This commit is contained in:
Qi Wang 2017-11-13 11:41:53 -08:00 committed by Qi Wang
parent d6feed6e66
commit 282a3faa17

View File

@ -370,7 +370,7 @@ extents_best_fit_locked(tsdn_t *tsdn, arena_t *arena, extents_t *extents,
(size_t)pind);
if (i < NPSIZES+1) {
assert(!extent_heap_empty(&extents->heaps[i]));
extent_t *extent = extent_heap_any(&extents->heaps[i]);
extent_t *extent = extent_heap_first(&extents->heaps[i]);
assert(extent_size_get(extent) >= size);
return extent;
}