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

Function alloc_next_id

src/graph_buffer/graph_buffer.c:421–426  ·  view source on GitHub ↗

Allocate the next buffer-local or shared-atomic ID. */

Source from the content-addressed store, hash-verified

419
420/* Allocate the next buffer-local or shared-atomic ID. */
421static int64_t alloc_next_id(cbm_gbuf_t *gb) {
422 if (gb->shared_ids) {
423 return atomic_fetch_add_explicit(gb->shared_ids, SKIP_ONE, memory_order_relaxed);
424 }
425 return gb->next_id++;
426}
427
428/* Swap-remove an edge from a pointer array by ID. */
429static void remove_edge_from_ptr_array(edge_ptr_array_t *arr, int64_t edge_id) {

Callers 2

cbm_gbuf_upsert_nodeFunction · 0.85
cbm_gbuf_insert_edgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected