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

Function irallocx_prof_sample

deps/jemalloc/src/jemalloc.c:3148–3171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3146}
3147
3148static void *
3149irallocx_prof_sample(tsdn_t *tsdn, void *old_ptr, size_t old_usize,
3150 size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena,
3151 prof_tctx_t *tctx, hook_ralloc_args_t *hook_args) {
3152 void *p;
3153
3154 if (tctx == NULL) {
3155 return NULL;
3156 }
3157 if (usize <= SC_SMALL_MAXCLASS) {
3158 p = iralloct(tsdn, old_ptr, old_usize,
3159 SC_LARGE_MINCLASS, alignment, zero, tcache,
3160 arena, hook_args);
3161 if (p == NULL) {
3162 return NULL;
3163 }
3164 arena_prof_promote(tsdn, p, usize);
3165 } else {
3166 p = iralloct(tsdn, old_ptr, old_usize, usize, alignment, zero,
3167 tcache, arena, hook_args);
3168 }
3169
3170 return p;
3171}
3172
3173JEMALLOC_ALWAYS_INLINE void *
3174irallocx_prof(tsd_t *tsd, void *old_ptr, size_t old_usize, size_t size,

Callers 1

irallocx_profFunction · 0.70

Calls 2

arena_prof_promoteFunction · 0.70
iralloctFunction · 0.50

Tested by

no test coverage detected