From df82338d8a2f118954d82b8421f8c1b9294a78a2 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Fri, 20 Dec 2024 13:04:30 -0800 Subject: [PATCH] don't override a page candidate with a page that is too full --- src/page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/page.c b/src/page.c index 85e831d22..4b25ed5d1 100644 --- a/src/page.c +++ b/src/page.c @@ -783,7 +783,7 @@ static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_queue_t* p page_candidate = page; candidate_count = 0; } - else if (/* !mi_page_is_expandable(page) && */ page->used >= page_candidate->used) { + else if (!mi_page_mostly_used(page) && page->used >= page_candidate->used) { page_candidate = page; } // if we find a non-expandable candidate, or searched for N pages, return with the best candidate