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

Function base_alloc

deps/jemalloc/src/base.c:463–466  ·  view source on GitHub ↗

* base_alloc() returns zeroed memory, which is always demand-zeroed for the * auto arenas, in order to make multi-page sparse data structures such as radix * tree nodes efficient with respect to physical memory usage. Upon success a * pointer to at least size bytes with specified alignment is returned. Note * that size is rounded up to the nearest multiple of alignment to avoid false * shar

Source from the content-addressed store, hash-verified

461 * sharing.
462 */
463void *
464base_alloc(tsdn_t *tsdn, base_t *base, size_t size, size_t alignment) {
465 return base_alloc_impl(tsdn, base, size, alignment, NULL);
466}
467
468extent_t *
469base_alloc_extent(tsdn_t *tsdn, base_t *base) {

Callers 11

arenas_i_implFunction · 0.70
ctl_initFunction · 0.70
prof_boot2Function · 0.70
background_thread_boot1Function · 0.70
rtree_node_alloc_implFunction · 0.70
rtree_leaf_alloc_implFunction · 0.70
tcaches_create_prepFunction · 0.70
tcache_bootFunction · 0.70
arena_newFunction · 0.70
base.cFile · 0.50
TEST_BEGINFunction · 0.50

Calls 1

base_alloc_implFunction · 0.70

Tested by 1

TEST_BEGINFunction · 0.40