Module rustdb::page [−][src]
Expand description
Page for SortedFile.
A page is up to PAGE_SIZE bytes, logically divided into up to 2047 fixed size nodes, which implement a balanced binary tree.
Nodes are numbered from 1..2047, with 0 indicating a null ( non-existent ) node.
Each record has a 3 byte overhead, 2 bits to store the balance, 2 x 11 bits to store left and right node ids.
Note that the left node is greater than the parent node.
Structs
A page in a SortedFile. Note that left subtree has nodes that compare greater.
Constants
= 8. 45 bits ( 1 + 4 x 11 ) needs 6 bytes, but use 8.
= 3. Size of Balance,Left,Right in a Node ( 2 + 2 x 11 = 24 bits = 3 bytes ).
The maximum size in bytes of each page.
Type Definitions
Rc<RefCell<Page>>