MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / arena_dalloc_promoted

Function arena_dalloc_promoted

deps/jemalloc/src/arena.c:1596–1619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1594}
1595
1596void
1597arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache,
1598 bool slow_path) {
1599 cassert(config_prof);
1600 assert(opt_prof);
1601
1602 extent_t *extent = iealloc(tsdn, ptr);
1603 size_t usize = extent_usize_get(extent);
1604 size_t bumped_usize = arena_prof_demote(tsdn, extent, ptr);
1605 if (config_opt_safety_checks && usize < SC_LARGE_MINCLASS) {
1606 /*
1607 * Currently, we only do redzoning for small sampled
1608 * allocations.
1609 */
1610 assert(bumped_usize == SC_LARGE_MINCLASS);
1611 safety_check_verify_redzone(ptr, usize, bumped_usize);
1612 }
1613 if (bumped_usize <= tcache_maxclass && tcache != NULL) {
1614 tcache_dalloc_large(tsdn_tsd(tsdn), tcache, ptr,
1615 sz_size2index(bumped_usize), slow_path);
1616 } else {
1617 large_dalloc(tsdn, extent);
1618 }
1619}
1620
1621static void
1622arena_dissociate_bin_slab(arena_t *arena, extent_t *slab, bin_t *bin) {

Callers 2

arena_dalloc_largeFunction · 0.50

Calls 8

arena_prof_demoteFunction · 0.70
large_dallocFunction · 0.70
ieallocFunction · 0.50
extent_usize_getFunction · 0.50
tcache_dalloc_largeFunction · 0.50
tsdn_tsdFunction · 0.50
sz_size2indexFunction · 0.50

Tested by

no test coverage detected