add abandoned reader barrier

This commit is contained in:
daanx 2023-04-04 16:04:17 -07:00
parent a2e1d2b893
commit db74fc0c98

View File

@ -484,6 +484,7 @@ static void mi_segment_os_free(mi_segment_t* segment, size_t segment_size, mi_se
fully_committed = false;
}
_mi_abandoned_await_readers(); // prevent ABA issue if concurrent readers try to access our memory (that might be purged)
_mi_arena_free(segment, segment_size, segment->mem_alignment, segment->mem_align_offset, segment->memid, fully_committed, tld->stats);
}