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

Function tsd_data_init

deps/jemalloc/src/tsd.c:218–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218static bool
219tsd_data_init(tsd_t *tsd) {
220 /*
221 * We initialize the rtree context first (before the tcache), since the
222 * tcache initialization depends on it.
223 */
224 rtree_ctx_data_init(tsd_rtree_ctxp_get_unsafe(tsd));
225
226 /*
227 * A nondeterministic seed based on the address of tsd reduces
228 * the likelihood of lockstep non-uniform cache index
229 * utilization among identical concurrent processes, but at the
230 * cost of test repeatability. For debug builds, instead use a
231 * deterministic seed.
232 */
233 *tsd_offset_statep_get(tsd) = config_debug ? 0 :
234 (uint64_t)(uintptr_t)tsd;
235
236 return tsd_tcache_enabled_data_init(tsd);
237}
238
239static void
240assert_tsd_data_cleanup_done(tsd_t *tsd) {

Callers 1

tsd_fetch_slowFunction · 0.70

Calls 2

rtree_ctx_data_initFunction · 0.70

Tested by

no test coverage detected