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

Function tsd_data_init_nocleanup

deps/memkind/src/jemalloc/src/tsd.c:88–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static bool
89tsd_data_init_nocleanup(tsd_t *tsd) {
90 assert(tsd->state == tsd_state_reincarnated ||
91 tsd->state == tsd_state_minimal_initialized);
92 /*
93 * During reincarnation, there is no guarantee that the cleanup function
94 * will be called (deallocation may happen after all tsd destructors).
95 * We set up tsd in a way that no cleanup is needed.
96 */
97 rtree_ctx_data_init(tsd_rtree_ctxp_get_unsafe(tsd));
98 *tsd_arenas_tdata_bypassp_get(tsd) = true;
99 *tsd_tcache_enabledp_get_unsafe(tsd) = false;
100 *tsd_reentrancy_levelp_get(tsd) = 1;
101 assert_tsd_data_cleanup_done(tsd);
102
103 return false;
104}
105
106tsd_t *
107tsd_fetch_slow(tsd_t *tsd, bool minimal) {

Callers 1

tsd_fetch_slowFunction · 0.70

Calls 2

rtree_ctx_data_initFunction · 0.70

Tested by

no test coverage detected