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

Function extent_hooks_set

deps/jemalloc/src/extent.c:206–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206extent_hooks_t *
207extent_hooks_set(tsd_t *tsd, arena_t *arena, extent_hooks_t *extent_hooks) {
208 background_thread_info_t *info;
209 if (have_background_thread) {
210 info = arena_background_thread_info_get(arena);
211 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx);
212 }
213 extent_hooks_t *ret = base_extent_hooks_set(arena->base, extent_hooks);
214 if (have_background_thread) {
215 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx);
216 }
217
218 return ret;
219}
220
221static void
222extent_hooks_assure_initialized(arena_t *arena,

Callers 1

arena_i_extent_hooks_ctlFunction · 0.70

Calls 4

base_extent_hooks_setFunction · 0.70
malloc_mutex_lockFunction · 0.50
tsd_tsdnFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by

no test coverage detected