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

Function rec_finalize

internal/cbm/sqlite_writer.c:463–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463static uint8_t *rec_finalize(RecordBuilder *r, int *out_len) {
464 *out_len = 0;
465 int total = rec_payload_len(r);
466 uint8_t *buf = (uint8_t *)malloc(total);
467 if (!buf) {
468 return NULL;
469 }
470 *out_len = rec_write(r, buf);
471 return buf;
472}
473
474/* One index build's cells live in an arena: they are all released together
475 * once the B-tree is written, where a malloc + free per row was 12.1 M

Callers 5

build_project_recordFunction · 0.85
build_master_recordFunction · 0.85
write_metadata_tablesFunction · 0.85
write_db_after_nodesFunction · 0.85

Calls 2

rec_payload_lenFunction · 0.85
rec_writeFunction · 0.85

Tested by

no test coverage detected