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

Function base_get_num_blocks

deps/jemalloc/src/base.c:129–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129static size_t
130base_get_num_blocks(base_t *base, bool with_new_block) {
131 base_block_t *b = base->blocks;
132 assert(b != NULL);
133
134 size_t n_blocks = with_new_block ? 2 : 1;
135 while (b->next != NULL) {
136 n_blocks++;
137 b = b->next;
138 }
139
140 return n_blocks;
141}
142
143static void
144base_auto_thp_switch(tsdn_t *tsdn, base_t *base) {

Callers 1

base_auto_thp_switchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected