Lines Matching refs:tsd
15 static quarantine_t *quarantine_grow(tsd_t *tsd, quarantine_t *quarantine);
16 static void quarantine_drain_one(tsd_t *tsd, quarantine_t *quarantine);
17 static void quarantine_drain(tsd_t *tsd, quarantine_t *quarantine,
23 quarantine_init(tsd_t *tsd, size_t lg_maxobjs) in quarantine_init() argument
27 assert(tsd_nominal(tsd)); in quarantine_init()
29 quarantine = (quarantine_t *)iallocztm(tsd, offsetof(quarantine_t, objs) in quarantine_init()
31 tcache_get(tsd, true), true, NULL); in quarantine_init()
43 quarantine_alloc_hook_work(tsd_t *tsd) in quarantine_alloc_hook_work() argument
47 if (!tsd_nominal(tsd)) in quarantine_alloc_hook_work()
50 quarantine = quarantine_init(tsd, LG_MAXOBJS_INIT); in quarantine_alloc_hook_work()
55 if (tsd_quarantine_get(tsd) == NULL) in quarantine_alloc_hook_work()
56 tsd_quarantine_set(tsd, quarantine); in quarantine_alloc_hook_work()
58 idalloctm(tsd, quarantine, tcache_get(tsd, false), true); in quarantine_alloc_hook_work()
62 quarantine_grow(tsd_t *tsd, quarantine_t *quarantine) in quarantine_grow() argument
66 ret = quarantine_init(tsd, quarantine->lg_maxobjs + 1); in quarantine_grow()
68 quarantine_drain_one(tsd, quarantine); in quarantine_grow()
90 idalloctm(tsd, quarantine, tcache_get(tsd, false), true); in quarantine_grow()
92 tsd_quarantine_set(tsd, ret); in quarantine_grow()
97 quarantine_drain_one(tsd_t *tsd, quarantine_t *quarantine) in quarantine_drain_one() argument
101 idalloc(tsd, obj->ptr); in quarantine_drain_one()
109 quarantine_drain(tsd_t *tsd, quarantine_t *quarantine, size_t upper_bound) in quarantine_drain() argument
113 quarantine_drain_one(tsd, quarantine); in quarantine_drain()
117 quarantine(tsd_t *tsd, void *ptr) in quarantine() argument
125 if ((quarantine = tsd_quarantine_get(tsd)) == NULL) { in quarantine()
126 idalloc(tsd, ptr); in quarantine()
136 quarantine_drain(tsd, quarantine, upper_bound); in quarantine()
140 quarantine = quarantine_grow(tsd, quarantine); in quarantine()
165 idalloc(tsd, ptr); in quarantine()
170 quarantine_cleanup(tsd_t *tsd) in quarantine_cleanup() argument
177 quarantine = tsd_quarantine_get(tsd); in quarantine_cleanup()
179 quarantine_drain(tsd, quarantine, 0); in quarantine_cleanup()
180 idalloctm(tsd, quarantine, tcache_get(tsd, false), true); in quarantine_cleanup()
181 tsd_quarantine_set(tsd, NULL); in quarantine_cleanup()