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

Function extent_interior_deregister

deps/jemalloc/src/extent.c:837–849  ·  view source on GitHub ↗

* Removes all pointers to the given extent from the global rtree indices for * its interior. This is relevant for slab extents, for which we need to do * metadata lookups at places other than the head of the extent. We deregister * on the interior, then, when an extent moves from being an active slab to an * inactive state. */

Source from the content-addressed store, hash-verified

835 * inactive state.
836 */
837static void
838extent_interior_deregister(tsdn_t *tsdn, rtree_ctx_t *rtree_ctx,
839 extent_t *extent) {
840 size_t i;
841
842 assert(extent_slab_get(extent));
843
844 for (i = 1; i < (extent_size_get(extent) >> LG_PAGE) - 1; i++) {
845 rtree_clear(tsdn, &extents_rtree, rtree_ctx,
846 (uintptr_t)extent_base_get(extent) + (uintptr_t)(i <<
847 LG_PAGE));
848 }
849}
850
851/*
852 * Removes all pointers to the given extent from the global rtree.

Callers 2

extent_deregister_implFunction · 0.70
extent_recordFunction · 0.70

Calls 4

extent_slab_getFunction · 0.50
extent_size_getFunction · 0.50
rtree_clearFunction · 0.50
extent_base_getFunction · 0.50

Tested by

no test coverage detected