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

Function gm_actual_bytes

src/store/graph_mem.c:420–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420static size_t gm_actual_bytes(const cbm_graph_mem_t *g) {
421 size_t offsets = ((size_t)g->n_ids + 1) * sizeof(uint32_t);
422 size_t per_edge = sizeof(uint32_t) + sizeof(uint8_t);
423 size_t bytes = GM_GROWTH * offsets + GM_GROWTH * (size_t)g->n_edges * per_edge;
424 for (int i = 0; i < g->type_count; i++) {
425 bytes += g->type_len[i] + 1;
426 }
427 return bytes + sizeof(*g) + strlen(g->path) + 1;
428}
429
430/* ── Acquire / release ──────────────────────────────────────────── */
431

Callers 1

cbm_graph_mem_acquireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected