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

Function gm_take

src/store/graph_mem.c:434–441  ·  view source on GitHub ↗

A ready hit takes a reference; a hit still being built answers NULL (the * caller uses SQL rather than waiting on another thread's build). */

Source from the content-addressed store, hash-verified

432/* A ready hit takes a reference; a hit still being built answers NULL (the
433 * caller uses SQL rather than waiting on another thread's build). */
434static cbm_graph_mem_t *gm_take(cbm_graph_mem_t *hit) {
435 if (!hit->ready) {
436 return NULL;
437 }
438 hit->refs++;
439 hit->last_use = ++g_use_clock;
440 return hit;
441}
442
443static cbm_graph_mem_t *gm_new_entry(const char *db_path, const char *version, size_t est) {
444 cbm_graph_mem_t *g = cbm_calloc(CBM_MEM_CLASS_GRAPH_CACHE, sizeof(*g));

Callers 1

cbm_graph_mem_acquireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected