mirror of https://github.com/microsoft/mimalloc
add assert for segment purges
This commit is contained in:
parent
bf5932c3c6
commit
09e91ec911
|
@ -518,6 +518,12 @@ static void mi_segment_os_free(mi_segment_t* segment, size_t segment_size, mi_se
|
|||
// called from `heap_collect`.
|
||||
void _mi_segments_collect(bool force, mi_segments_tld_t* tld) {
|
||||
mi_pages_try_purge(force,tld);
|
||||
#if MI_DEBUG>=2
|
||||
if (!_mi_is_main_thread()) {
|
||||
mi_assert_internal(tld->pages_purge.first == NULL);
|
||||
mi_assert_internal(tld->pages_purge.last == NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue