MCPcopy Create free account
hub / github.com/F-Stack/f-stack / arena_malloc_hard

Function arena_malloc_hard

app/redis-6.2.6/deps/jemalloc/src/arena.c:1370–1386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1368}
1369
1370void *
1371arena_malloc_hard(tsdn_t *tsdn, arena_t *arena, size_t size, szind_t ind,
1372 bool zero) {
1373 assert(!tsdn_null(tsdn) || arena != NULL);
1374
1375 if (likely(!tsdn_null(tsdn))) {
1376 arena = arena_choose(tsdn_tsd(tsdn), arena);
1377 }
1378 if (unlikely(arena == NULL)) {
1379 return NULL;
1380 }
1381
1382 if (likely(size <= SMALL_MAXCLASS)) {
1383 return arena_malloc_small(tsdn, arena, ind, zero);
1384 }
1385 return large_malloc(tsdn, arena, sz_index2size(ind), zero);
1386}
1387
1388void *
1389arena_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize, size_t alignment,

Callers 1

arena_mallocFunction · 0.85

Calls 6

tsdn_nullFunction · 0.85
arena_chooseFunction · 0.85
tsdn_tsdFunction · 0.85
arena_malloc_smallFunction · 0.85
large_mallocFunction · 0.85
sz_index2sizeFunction · 0.85

Tested by

no test coverage detected