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

Function prof_accum_init

deps/jemalloc/src/prof.c:2032–2046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2030}
2031
2032bool
2033prof_accum_init(tsdn_t *tsdn, prof_accum_t *prof_accum) {
2034 cassert(config_prof);
2035
2036#ifndef JEMALLOC_ATOMIC_U64
2037 if (malloc_mutex_init(&prof_accum->mtx, "prof_accum",
2038 WITNESS_RANK_PROF_ACCUM, malloc_mutex_rank_exclusive)) {
2039 return true;
2040 }
2041 prof_accum->accumbytes = 0;
2042#else
2043 atomic_store_u64(&prof_accum->accumbytes, 0, ATOMIC_RELAXED);
2044#endif
2045 return false;
2046}
2047
2048void
2049prof_idump(tsdn_t *tsdn) {

Callers 1

arena_newFunction · 0.70

Calls 1

malloc_mutex_initFunction · 0.70

Tested by

no test coverage detected