mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 11:58:41 +03:00
revise free reclaim; ensure unown cannot race with a free
This commit is contained in:
parent
833b091ff9
commit
666c089fc8
10 changed files with 281 additions and 79 deletions
|
@ -811,7 +811,7 @@ static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_queue_t* p
|
|||
_mi_page_free(page_candidate, pq);
|
||||
page_candidate = page;
|
||||
}
|
||||
else if (page->used >= page_candidate->used) {
|
||||
else if (page->used >= page_candidate->used && !mi_page_is_mostly_used(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