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

Function prof_malloc

deps/jemalloc/include/jemalloc/internal/prof_inlines_b.h:165–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165JEMALLOC_ALWAYS_INLINE void
166prof_malloc(tsdn_t *tsdn, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx,
167 prof_tctx_t *tctx) {
168 cassert(config_prof);
169 assert(ptr != NULL);
170 assert(usize == isalloc(tsdn, ptr));
171
172 if (unlikely((uintptr_t)tctx > (uintptr_t)1U)) {
173 prof_malloc_sample_object(tsdn, ptr, usize, tctx);
174 } else {
175 prof_tctx_set(tsdn, ptr, usize, alloc_ctx,
176 (prof_tctx_t *)(uintptr_t)1U);
177 }
178}
179
180JEMALLOC_ALWAYS_INLINE void
181prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,

Callers 1

imalloc_bodyFunction · 0.50

Calls 3

isallocFunction · 0.70
prof_tctx_setFunction · 0.70

Tested by

no test coverage detected