summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2015-05-30 00:49:18 (GMT)
committerJason Evans <je@fb.com>2015-05-30 02:20:36 (GMT)
commit09983d2f540fec53a59ac58cba5d86181bf7838a (patch)
tree4cc45e812041d4a75e3811789fd2ab2a9df274fe
parentc073f8167a96a9bec98c61df4d2461811c3c10a4 (diff)
downloadjemalloc-09983d2f540fec53a59ac58cba5d86181bf7838a.zip
jemalloc-09983d2f540fec53a59ac58cba5d86181bf7838a.tar.gz
jemalloc-09983d2f540fec53a59ac58cba5d86181bf7838a.tar.bz2
Bypass tcache when draining quarantined allocations.
This avoids the potential surprise of deallocating an object with one tcache specified, and having the object cached in a different tcache once it drains from the quarantine.
-rw-r--r--src/quarantine.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quarantine.c b/src/quarantine.c
index adc7305..6c43dfc 100644
--- a/src/quarantine.c
+++ b/src/quarantine.c
@@ -98,7 +98,7 @@ quarantine_drain_one(tsd_t *tsd, quarantine_t *quarantine)
{
quarantine_obj_t *obj = &quarantine->objs[quarantine->first];
assert(obj->usize == isalloc(obj->ptr, config_prof));
- idalloc(tsd, obj->ptr);
+ idalloctm(tsd, obj->ptr, NULL, false);
quarantine->curbytes -= obj->usize;
quarantine->curobjs--;
quarantine->first = (quarantine->first + 1) & ((ZU(1) <<
@@ -123,7 +123,7 @@ quarantine(tsd_t *tsd, void *ptr)
assert(opt_quarantine);
if ((quarantine = tsd_quarantine_get(tsd)) == NULL) {
- idalloc(tsd, ptr);
+ idalloctm(tsd, ptr, NULL, false);
return;
}
/*
@@ -162,7 +162,7 @@ quarantine(tsd_t *tsd, void *ptr)
}
} else {
assert(quarantine->curbytes == 0);
- idalloc(tsd, ptr);
+ idalloctm(tsd, ptr, NULL, false);
}
}