possible fix for issue #221

This commit is contained in:
daan 2020-04-06 11:49:32 -07:00
parent 34d3b8c47f
commit 84b9b8878e

View File

@ -1298,16 +1298,16 @@ void _mi_segment_huge_page_free(mi_segment_t* segment, mi_page_t* page, mi_block
page->used--;
page->is_zero = false;
mi_assert(page->used == 0);
mi_segments_tld_t* tld = &heap->tld->segments;
mi_tld_t* tld = heap->tld;
const size_t bsize = mi_page_usable_block_size(page);
if (bsize > MI_HUGE_OBJ_SIZE_MAX) {
_mi_stat_decrease(&tld->stats->giant, bsize);
_mi_stat_decrease(&tld->stats.giant, bsize);
}
else {
_mi_stat_decrease(&tld->stats->huge, bsize);
_mi_stat_decrease(&tld->stats.huge, bsize);
}
mi_segments_track_size((long)segment->segment_size, tld);
_mi_segment_page_free(page, true, tld);
mi_segments_track_size((long)segment->segment_size, &tld->segments);
_mi_segment_page_free(page, true, &tld->segments);
}
}