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

Function prof_gctx_mutex_choose

deps/jemalloc/src/prof.c:808–813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806#endif
807
808static malloc_mutex_t *
809prof_gctx_mutex_choose(void) {
810 unsigned ngctxs = atomic_fetch_add_u(&cum_gctxs, 1, ATOMIC_RELAXED);
811
812 return &gctx_locks[(ngctxs - 1) % PROF_NCTX_LOCKS];
813}
814
815static malloc_mutex_t *
816prof_tdata_mutex_choose(uint64_t thr_uid) {

Callers 1

prof_gctx_createFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected