MCPcopy Index your code
hub / github.com/git/git / find_mem_pool

Function find_mem_pool

read-cache.c:115–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static struct mem_pool *find_mem_pool(struct index_state *istate)
116{
117 struct mem_pool **pool_ptr;
118
119 if (istate->split_index && istate->split_index->base)
120 pool_ptr = &istate->split_index->base->ce_mem_pool;
121 else
122 pool_ptr = &istate->ce_mem_pool;
123
124 if (!*pool_ptr) {
125 *pool_ptr = xmalloc(sizeof(**pool_ptr));
126 mem_pool_init(*pool_ptr, 0);
127 }
128
129 return *pool_ptr;
130}
131
132static const char *alternate_index_output;
133

Callers 1

make_empty_cache_entryFunction · 0.85

Calls 2

mem_pool_initFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected