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

Function tsd_fetch_impl

deps/jemalloc/include/jemalloc/internal/tsd.h:344–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344JEMALLOC_ALWAYS_INLINE tsd_t *
345tsd_fetch_impl(bool init, bool minimal) {
346 tsd_t *tsd = tsd_get(init);
347
348 if (!init && tsd_get_allocates() && tsd == NULL) {
349 return NULL;
350 }
351 assert(tsd != NULL);
352
353 if (unlikely(tsd_state_get(tsd) != tsd_state_nominal)) {
354 return tsd_fetch_slow(tsd, minimal);
355 }
356 assert(tsd_fast(tsd));
357 tsd_assert_fast(tsd);
358
359 return tsd;
360}
361
362/* Get a minimal TSD that requires no cleanup. See comments in free(). */
363JEMALLOC_ALWAYS_INLINE tsd_t *

Callers 3

tsd_fetch_minFunction · 0.70
tsd_fetchFunction · 0.70
tsdn_fetchFunction · 0.70

Calls 6

tsd_state_getFunction · 0.85
tsd_getFunction · 0.70
tsd_get_allocatesFunction · 0.70
tsd_fastFunction · 0.70
tsd_assert_fastFunction · 0.70
tsd_fetch_slowFunction · 0.50

Tested by

no test coverage detected