MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / tld_graph_alloc

Function tld_graph_alloc

src/pipeline/pass_complexity.c:181–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181static bool tld_graph_alloc(tld_graph_t *g, int64_t maxid, int seed_cap, int edge_count) {
182 size_t sz = (size_t)maxid + 1;
183 g->maxid = maxid;
184 g->keys = cbm_calloc(CBM_MEM_CLASS_OTHER, sz * sizeof(*g->keys));
185 g->present = cbm_calloc(CBM_MEM_CLASS_OTHER, sz * sizeof(*g->present));
186 g->loop_depth = cbm_calloc(CBM_MEM_CLASS_OTHER, sz * sizeof(*g->loop_depth));
187 g->recursive = cbm_calloc(CBM_MEM_CLASS_OTHER, sz * sizeof(*g->recursive));
188 g->seeds = cbm_calloc(CBM_MEM_CLASS_OTHER, ((size_t)seed_cap + 1) * sizeof(*g->seeds));
189 g->first = cbm_calloc(CBM_MEM_CLASS_OTHER, (sz + 1) * sizeof(*g->first));
190 g->callee = cbm_calloc(CBM_MEM_CLASS_OTHER, ((size_t)edge_count + 1) * sizeof(*g->callee));
191 return g->keys && g->present && g->loop_depth && g->recursive && g->seeds && g->first &&
192 g->callee;
193}
194
195/* Sources must be counted into first[src + 1] before this; turns the counts
196 * into offsets. */

Callers 2

tld_gather_gbufFunction · 0.85
tld_gather_storeFunction · 0.85

Calls 1

cbm_callocFunction · 0.85

Tested by

no test coverage detected