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

Function arena_stash_decayed

deps/jemalloc/src/arena.c:823–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

821}
822
823static size_t
824arena_stash_decayed(tsdn_t *tsdn, arena_t *arena,
825 extent_hooks_t **r_extent_hooks, extents_t *extents, size_t npages_limit,
826 size_t npages_decay_max, extent_list_t *decay_extents) {
827 witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn),
828 WITNESS_RANK_CORE, 0);
829
830 /* Stash extents according to npages_limit. */
831 size_t nstashed = 0;
832 extent_t *extent;
833 while (nstashed < npages_decay_max &&
834 (extent = extents_evict(tsdn, arena, r_extent_hooks, extents,
835 npages_limit)) != NULL) {
836 extent_list_append(decay_extents, extent);
837 nstashed += extent_size_get(extent) >> LG_PAGE;
838 }
839 return nstashed;
840}
841
842static size_t
843arena_decay_stashed(tsdn_t *tsdn, arena_t *arena,

Callers 1

arena_decay_to_limitFunction · 0.70

Calls 4

extents_evictFunction · 0.70
extent_list_appendFunction · 0.50
extent_size_getFunction · 0.50

Tested by

no test coverage detected