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

Function prof_thr_uid_alloc

deps/jemalloc/src/prof.c:2188–2198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2186}
2187
2188static uint64_t
2189prof_thr_uid_alloc(tsdn_t *tsdn) {
2190 uint64_t thr_uid;
2191
2192 malloc_mutex_lock(tsdn, &next_thr_uid_mtx);
2193 thr_uid = next_thr_uid;
2194 next_thr_uid++;
2195 malloc_mutex_unlock(tsdn, &next_thr_uid_mtx);
2196
2197 return thr_uid;
2198}
2199
2200static prof_tdata_t *
2201prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid, uint64_t thr_discrim,

Callers 1

prof_tdata_initFunction · 0.70

Calls 2

malloc_mutex_lockFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by

no test coverage detected