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

Function pb_cell_fits

internal/cbm/sqlite_writer.c:643–647  ·  view source on GitHub ↗

Check if a cell of given size fits in the current page

Source from the content-addressed store, hash-verified

641
642// Check if a cell of given size fits in the current page
643static bool pb_cell_fits(PageBuilder *pb, int cell_len) {
644 // Cell pointer (2 bytes) + cell content
645 int available = pb->content_offset - pb->ptr_offset - CELL_PTR_SIZE;
646 return cell_len <= available;
647}
648
649// Add a cell to the current leaf page.
650// For table leaves: varint(payload_len) + varint(rowid) + payload

Callers 2

pb_place_table_cellFunction · 0.85
write_index_btreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected