You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (_n%100==0||_n<=3) printf("QSBR CLEAR from _mi_free_delayed_block page=%p all_free=%d used=%d (%d)\n",(void*)page,(int)mi_page_all_free(page),(int)page->used,_n);
631
+
}
628
632
_mi_page_free_collect(page, false);
629
633
630
634
// and free the block (possibly freeing the page as well since used is updated)
if (_n%100==0||_n<=3) printf("QSBR CLEAR from mi_page_to_full page=%p all_free=%d used=%d (%d)\n",(void*)page,(int)mi_page_all_free(page),(int)page->used,_n);
384
+
}
374
385
_mi_page_free_collect(page,false); // try to collect right away in case another thread freed just before MI_USE_DELAYED_FREE was set
375
386
}
376
387
@@ -752,6 +763,10 @@ static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_queue_t* p
752
763
#endif
753
764
754
765
// 0. collect freed blocks by us and other threads
766
+
if (page->qsbr_node.next!=NULL&& (page->local_free!=NULL||mi_page_thread_free(page) !=NULL)) {
if (_n%100==0||_n<=3) printf("QSBR CLEAR from find_free_ex page=%p all_free=%d used=%d (%d)\n",(void*)page,(int)mi_page_all_free(page),(int)page->used,_n);
769
+
}
755
770
_mi_page_free_collect(page, false);
756
771
757
772
// 1. if the page contains free blocks, we are done
@@ -777,6 +792,15 @@ static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_queue_t* p
if (_n%100==0||_n<=3) printf("QSBR CLEAR from mi_page_fresh_alloc page=%p all_free=%d used=%d (%d)\n",(void*)page,(int)mi_page_all_free(page),(int)page->used,_n);
0 commit comments