more fine grained commit tracking per MiB

This commit is contained in:
daan 2019-11-24 19:06:30 -08:00
parent 128cdd1dfb
commit ec0005b919
4 changed files with 5 additions and 5 deletions

View file

@ -203,7 +203,7 @@ static void mi_cache_purge(mi_os_tld_t* tld) {
void* p = mi_atomic_read_ptr_relaxed(&slot->p);
if (p > MI_SLOT_IN_USE && !slot->is_committed && !slot->is_large) {
mi_msecs_t expire = slot->expire;
if (now >= expire) {
if (expire != 0 && now >= expire) {
// expired, try to claim it
if (mi_atomic_cas_ptr_weak(&slot->p, MI_SLOT_IN_USE, p)) {
// claimed! test again