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

Function extent_dalloc_wrapper_try

app/redis-6.2.6/deps/jemalloc/src/extent.c:1668–1700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1666}
1667
1668static bool
1669extent_dalloc_wrapper_try(tsdn_t *tsdn, arena_t *arena,
1670 extent_hooks_t **r_extent_hooks, extent_t *extent) {
1671 bool err;
1672
1673 assert(extent_base_get(extent) != NULL);
1674 assert(extent_size_get(extent) != 0);
1675 witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn),
1676 WITNESS_RANK_CORE, 0);
1677
1678 extent_addr_set(extent, extent_base_get(extent));
1679
1680 extent_hooks_assure_initialized(arena, r_extent_hooks);
1681 /* Try to deallocate. */
1682 if (*r_extent_hooks == &extent_hooks_default) {
1683 /* Call directly to propagate tsdn. */
1684 err = extent_dalloc_default_impl(extent_base_get(extent),
1685 extent_size_get(extent));
1686 } else {
1687 extent_hook_pre_reentrancy(tsdn, arena);
1688 err = ((*r_extent_hooks)->dalloc == NULL ||
1689 (*r_extent_hooks)->dalloc(*r_extent_hooks,
1690 extent_base_get(extent), extent_size_get(extent),
1691 extent_committed_get(extent), arena_ind_get(arena)));
1692 extent_hook_post_reentrancy(tsdn);
1693 }
1694
1695 if (!err) {
1696 extent_dalloc(tsdn, arena, extent);
1697 }
1698
1699 return err;
1700}
1701
1702void
1703extent_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena,

Callers 1

extent_dalloc_wrapperFunction · 0.85

Calls 11

extent_base_getFunction · 0.85
extent_size_getFunction · 0.85
extent_addr_setFunction · 0.85
extent_committed_getFunction · 0.85
arena_ind_getFunction · 0.85
extent_dallocFunction · 0.85

Tested by

no test coverage detected