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

Function malloc_narenas_default

deps/jemalloc/src/jemalloc.c:1601–1613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1599}
1600
1601static unsigned
1602malloc_narenas_default(void) {
1603 assert(ncpus > 0);
1604 /*
1605 * For SMP systems, create more than one arena per CPU by
1606 * default.
1607 */
1608 if (ncpus > 1) {
1609 return ncpus << 2;
1610 } else {
1611 return 1;
1612 }
1613}
1614
1615static percpu_arena_mode_t
1616percpu_arena_as_initialized(percpu_arena_mode_t mode) {

Callers 1

malloc_init_narenasFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected