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

Function tsd_data_init_nocleanup

deps/jemalloc/src/tsd.c:251–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251static bool
252tsd_data_init_nocleanup(tsd_t *tsd) {
253 assert(tsd_state_get(tsd) == tsd_state_reincarnated ||
254 tsd_state_get(tsd) == tsd_state_minimal_initialized);
255 /*
256 * During reincarnation, there is no guarantee that the cleanup function
257 * will be called (deallocation may happen after all tsd destructors).
258 * We set up tsd in a way that no cleanup is needed.
259 */
260 rtree_ctx_data_init(tsd_rtree_ctxp_get_unsafe(tsd));
261 *tsd_arenas_tdata_bypassp_get(tsd) = true;
262 *tsd_tcache_enabledp_get_unsafe(tsd) = false;
263 *tsd_reentrancy_levelp_get(tsd) = 1;
264 assert_tsd_data_cleanup_done(tsd);
265
266 return false;
267}
268
269tsd_t *
270tsd_fetch_slow(tsd_t *tsd, bool minimal) {

Callers 1

tsd_fetch_slowFunction · 0.70

Calls 3

tsd_state_getFunction · 0.85
rtree_ctx_data_initFunction · 0.70

Tested by

no test coverage detected