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

Function heap_strdup

src/graph_buffer/graph_buffer.c:149–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147/* ── Helpers ─────────────────────────────────────────────────────── */
148
149static char *heap_strdup(const char *s) {
150 return cbm_mem_strdup(CBM_MEM_CLASS_GBUF_STRING, s ? s : "{}");
151}
152
153/* Intern a repetitive string into the buffer's pool: identical content collapses
154 * to a single heap copy owned by the pool. NULL maps to "{}" (matches

Callers 4

cbm_gbuf_upsert_nodeFunction · 0.70
merge_update_existingFunction · 0.70
merge_copy_new_nodeFunction · 0.70

Calls 1

cbm_mem_strdupFunction · 0.85

Tested by

no test coverage detected