Granary_block.MemSourceIn-memory BLOCK device: a fixed-size, page-addressed buffer.
Implements the same page-read/write/sync/resize interface as the Unix-file backend (Granary_unix.Unix_file) but keeps all pages in memory, for tests and ephemeral databases. sync is a no-op.
Pretty-print the device's page count.
Pretty-print an error.
create ?page_size ~n_pages () allocates a zero-filled device of n_pages pages, each page_size bytes (default 4096, #95).
read_page t ~page_id buf copies page page_id into buf.
write_page t ~page_id buf stores buf as page page_id.