mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
merge from dev; match test-stress
This commit is contained in:
commit
278f1ff556
3 changed files with 8 additions and 9 deletions
|
@ -682,7 +682,8 @@ static mi_decl_noinline mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, m
|
|||
_mi_page_free(page_candidate, pq);
|
||||
page_candidate = page;
|
||||
}
|
||||
else if (page->used >= page_candidate->used && !mi_page_is_mostly_used(page)) {
|
||||
// prefer to reuse fuller pages (in the hope the less used page gets freed)
|
||||
else if (page->used >= page_candidate->used && !mi_page_is_mostly_used(page) && !mi_page_is_expandable(page)) {
|
||||
page_candidate = page;
|
||||
}
|
||||
// if we find a non-expandable candidate, or searched for N pages, return with the best candidate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue