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

Function ix_alloc

src/pipeline/doc_links_cs.c:625–629  ·  view source on GitHub ↗

Index memory. A failed allocation is remembered: whatever a caller does * with its NULL, the build as a whole reports failure instead of handing out * an index that silently lacks a declaration. */

Source from the content-addressed store, hash-verified

623 * with its NULL, the build as a whole reports failure instead of handing out
624 * an index that silently lacks a declaration. */
625static void *ix_alloc(cs_index_t *ix, size_t n) {
626 void *p = cbm_arena_alloc(&ix->arena, n ? n : SKIP_ONE);
627 ix->oom = ix->oom || !p;
628 return p;
629}
630
631static void *ix_zalloc(cs_index_t *ix, size_t n) {
632 void *p = ix_alloc(ix, n);

Callers 15

ix_zallocFunction · 0.70
ns_makeFunction · 0.70
finish_lookupsFunction · 0.70
parse_scopeFunction · 0.70
collect_projectsFunction · 0.70
unit_getFunction · 0.70
unit_add_usingFunction · 0.70
entity_add_declFunction · 0.70
entity_fullsFunction · 0.70
entity_unitsFunction · 0.70
build_namedFunction · 0.70
build_bindsFunction · 0.70

Calls 1

cbm_arena_allocFunction · 0.50

Tested by

no test coverage detected