Fix run leak.

Fix arena_run_first_best_fit() to search all potentially non-empty
runs_avail heaps, rather than ignoring the heap that contains runs
larger than large_maxclass, but less than chunksize.

This fixes a regression caused by
f193fd80cf (Refactor runs_avail.).

This resolves #493.
This commit is contained in:
Jason Evans
2016-11-07 09:37:12 -08:00
parent 9bef119b42
commit a4e83e8593
2 changed files with 8 additions and 6 deletions

View File

@@ -111,7 +111,7 @@ TEST_BEGIN(test_monotonic)
floor_prev = 0;
ceil_prev = 0;
for (i = 1; i <= large_maxclass >> LG_PAGE; i++) {
for (i = 1; i <= chunksize >> LG_PAGE; i++) {
size_t run_size, floor, ceil;
run_size = i << LG_PAGE;