MCPcopy Create free account
hub / github.com/beefytech/Beef / imalloc_no_sample

Function imalloc_no_sample

BeefRT/JEMalloc/src/jemalloc.c:2380–2400  ·  view source on GitHub ↗

ind is ignored if dopts->alignment > 0. */

Source from the content-addressed store, hash-verified

2378
2379/* ind is ignored if dopts->alignment > 0. */
2380JEMALLOC_ALWAYS_INLINE void *
2381imalloc_no_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd,
2382 size_t size, size_t usize, szind_t ind) {
2383 /* Fill in the tcache. */
2384 tcache_t *tcache = tcache_get_from_ind(tsd, dopts->tcache_ind,
2385 sopts->slow, /* is_alloc */ true);
2386
2387 /* Fill in the arena. */
2388 arena_t *arena;
2389 if (arena_get_from_ind(tsd, dopts->arena_ind, &arena)) {
2390 return NULL;
2391 }
2392
2393 if (unlikely(dopts->alignment != 0)) {
2394 return ipalloct(tsd_tsdn(tsd), usize, dopts->alignment,
2395 dopts->zero, tcache, arena);
2396 }
2397
2398 return iallocztm(tsd_tsdn(tsd), size, ind, dopts->zero, tcache, false,
2399 arena, sopts->slow);
2400}
2401
2402JEMALLOC_ALWAYS_INLINE void *
2403imalloc_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd,

Callers 2

imalloc_sampleFunction · 0.85
imalloc_bodyFunction · 0.85

Calls 5

tcache_get_from_indFunction · 0.85
arena_get_from_indFunction · 0.85
ipalloctFunction · 0.85
tsd_tsdnFunction · 0.85
iallocztmFunction · 0.85

Tested by

no test coverage detected