Safe Haskell | None |
---|---|
Language | Haskell2010 |
A page allocator manages all physical pages.
- class (Applicative m, Monad m) => AllocReaderM m where
- class AllocReaderM m => AllocM m where
Classes
class (Applicative m, Monad m) => AllocReaderM m where Source #
A page allocator that can read physical pages.
class AllocReaderM m => AllocM m where Source #
A page allocator that can write physical pages.
nodePageSize, maxPageSize, maxKeySize, maxValueSize, allocNode, freeNode, allocOverflow, freeOverflow
nodePageSize :: (Key key, Value val) => m (Height height -> Node height key val -> PageSize) Source #
A function that calculates the hypothetical size of a node, if it were to be written to a page (regardless of the maximum page size).
maxPageSize :: m PageSize Source #
The maximum page size the allocator can handle.
maxKeySize :: m Word64 Source #
The maximum key size
maxValueSize :: m Word64 Source #
The maximum value size
allocNode :: (Key key, Value val) => Height height -> Node height key val -> m (NodeId height key val) Source #
Allocate a new page for a node, and write the node to the page.
freeNode :: Height height -> NodeId height key val -> m () Source #
Free the page belonging to the node.
allocOverflow :: Value val => val -> m OverflowId Source #
Allocate a new overflow page, and write the value to the page.
freeOverflow :: OverflowId -> m () Source #
Free an overflow page.