add recursion guard to deferred callback

This commit is contained in:
daan 2019-09-09 08:02:41 -07:00
parent e227341f5b
commit 23155c5d71
4 changed files with 7 additions and 4 deletions

View file

@ -110,7 +110,7 @@ static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
{
if (!mi_heap_is_initialized(heap)) return;
_mi_deferred_free(heap, collect > NORMAL);
// collect (some) abandoned pages
if (collect >= NORMAL && !heap->no_reclaim) {
if (collect == NORMAL) {