Granary_storage.GeometrySourcePage geometry (#95): the per-file choice of page_size and reserved_bytes_per_page, fixed at file creation and persisted in the header. Addressing is offset = page_id * page_size, so the size is uniform across a file and immutable once chosen.
This is a cheap, pure value carried on the pager/store context; the derived sizes below are plain field arithmetic, safe to call on every page op.
type t = {page_size : int;total bytes per page on disk; a multiple of 4096
*)reserved_bytes_per_page : int;fixed bytes carved off the END of every page (default 0); subtractive overhead reserved for future fixed-size per-page metadata such as a per-page AEAD tag for at-rest encryption (#84). Does not enable page-level compression.
*)}Pretty-print a geometry as { page_size = ...; reserved_bytes_per_page = ... }.
16 — the common page header, excluded from usable payload.
12 — bytes per freelist entry.
The historical fixed geometry: 4096-byte page, no reserved bytes. Used as the default at creation and as the bootstrap geometry while peeking a header to learn a file's real page size.
Usable data-area bytes: page_size - header_size - reserved_bytes_per_page.
Maximum payload an overflow page can hold: max_data_bytes - 2 (2 bytes for the payload-length field).
Freelist entries that fit on one freelist page: max_data_bytes / 12.
A creation-time geometry-validation failure.
Pretty-print a validation error.