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

Function arena_new_create_background_thread

deps/jemalloc/src/jemalloc.c:345–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345static void
346arena_new_create_background_thread(tsdn_t *tsdn, unsigned ind) {
347 if (ind == 0) {
348 return;
349 }
350 /*
351 * Avoid creating a new background thread just for the huge arena, which
352 * purges eagerly by default.
353 */
354 if (have_background_thread && !arena_is_huge(ind)) {
355 if (background_thread_create(tsdn_tsd(tsdn), ind)) {
356 malloc_printf("<jemalloc>: error in background thread "
357 "creation for arena %u. Abort.\n", ind);
358 abort();
359 }
360 }
361}
362
363arena_t *
364arena_init(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks) {

Callers 2

arena_initFunction · 0.70
arena_choose_hardFunction · 0.70

Calls 4

arena_is_hugeFunction · 0.85
background_thread_createFunction · 0.70
malloc_printfFunction · 0.70
tsdn_tsdFunction · 0.50

Tested by

no test coverage detected