MCPcopy Create free account
hub / github.com/F-Stack/f-stack / item_dtor

Function item_dtor

freebsd/vm/uma_core.c:3257–3281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3255}
3256
3257static inline void
3258item_dtor(uma_zone_t zone, void *item, int size, void *udata,
3259 enum zfreeskip skip)
3260{
3261#ifdef INVARIANTS
3262 bool skipdbg;
3263
3264 skipdbg = uma_dbg_zskip(zone, item);
3265 if (skip == SKIP_NONE && !skipdbg) {
3266 if ((zone->uz_flags & UMA_ZONE_MALLOC) != 0)
3267 uma_dbg_free(zone, udata, item);
3268 else
3269 uma_dbg_free(zone, NULL, item);
3270 }
3271#endif
3272 if (__predict_true(skip < SKIP_DTOR)) {
3273 if (zone->uz_dtor != NULL)
3274 zone->uz_dtor(item, size, udata);
3275#ifdef INVARIANTS
3276 if (!skipdbg && (zone->uz_flags & UMA_ZFLAG_TRASH) != 0 &&
3277 zone->uz_dtor != trash_dtor)
3278 trash_dtor(item, size, udata);
3279#endif
3280 }
3281}
3282
3283#ifdef NUMA
3284static int

Callers 4

zone_fetch_bucketFunction · 0.85
bucket_drainFunction · 0.85
uma_zfree_argFunction · 0.85
zone_free_itemFunction · 0.85

Calls 3

uma_dbg_zskipFunction · 0.85
uma_dbg_freeFunction · 0.85
trash_dtorFunction · 0.85

Tested by

no test coverage detected