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

Function arenas_create_ctl

app/redis-6.2.6/deps/jemalloc/src/ctl.c:2453–2474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2451}
2452
2453static int
2454arenas_create_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp,
2455 size_t *oldlenp, void *newp, size_t newlen) {
2456 int ret;
2457 extent_hooks_t *extent_hooks;
2458 unsigned arena_ind;
2459
2460 malloc_mutex_lock(tsd_tsdn(tsd), &ctl_mtx);
2461
2462 extent_hooks = (extent_hooks_t *)&extent_hooks_default;
2463 WRITE(extent_hooks, extent_hooks_t *);
2464 if ((arena_ind = ctl_arena_init(tsd, extent_hooks)) == UINT_MAX) {
2465 ret = EAGAIN;
2466 goto label_return;
2467 }
2468 READ(arena_ind, unsigned);
2469
2470 ret = 0;
2471label_return:
2472 malloc_mutex_unlock(tsd_tsdn(tsd), &ctl_mtx);
2473 return ret;
2474}
2475
2476static int
2477arenas_lookup_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp,

Callers

nothing calls this directly

Calls 4

malloc_mutex_lockFunction · 0.85
tsd_tsdnFunction · 0.85
ctl_arena_initFunction · 0.85
malloc_mutex_unlockFunction · 0.85

Tested by

no test coverage detected