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

Function arena_init_huge

deps/jemalloc/src/arena.c:2142–2160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2140}
2141
2142bool
2143arena_init_huge(void) {
2144 bool huge_enabled;
2145
2146 /* The threshold should be large size class. */
2147 if (opt_oversize_threshold > SC_LARGE_MAXCLASS ||
2148 opt_oversize_threshold < SC_LARGE_MINCLASS) {
2149 opt_oversize_threshold = 0;
2150 oversize_threshold = SC_LARGE_MAXCLASS + PAGE;
2151 huge_enabled = false;
2152 } else {
2153 /* Reserve the index for the huge arena. */
2154 huge_arena_ind = narenas_total_get();
2155 oversize_threshold = opt_oversize_threshold;
2156 huge_enabled = true;
2157 }
2158
2159 return huge_enabled;
2160}
2161
2162bool
2163arena_is_huge(unsigned arena_ind) {

Callers 1

malloc_init_narenasFunction · 0.85

Calls 1

narenas_total_getFunction · 0.70

Tested by

no test coverage detected