insert full pages that became unfull, at the start of the page queue to increase potential reuse

This commit is contained in:
daanx 2024-10-09 14:35:33 -07:00
parent a05b5ab0a1
commit 96877159c2
2 changed files with 49 additions and 11 deletions

View file

@ -357,7 +357,7 @@ void _mi_page_unfull(mi_page_t* page) {
mi_page_set_in_full(page, false); // to get the right queue
mi_page_queue_t* pq = mi_heap_page_queue_of(heap, page);
mi_page_set_in_full(page, true);
mi_page_queue_enqueue_from(pq, pqfull, page);
mi_page_queue_enqueue_from_at_start(pq, pqfull, page); // insert at the start to increase the chance of reusing full pages (?)
}
static void mi_page_to_full(mi_page_t* page, mi_page_queue_t* pq) {