Skip to main content

cut_records

Function cut_records 

Source
fn cut_records(len: usize, bytes: usize, space: usize) -> usize
Expand description

Records of a body with len records in bytes that fit in space bytes at the body’s average width, keeping 5% of COMMIT_BYTES as a margin for per-piece framing. Uniform rows cut this way fill their size class and leave one short remainder that settle can coalesce. Uneven widths can still overflow, so callers check the cut piece.