Struct std::BTree
generic<V> struct BTree {
struct BTreeNode<V> pool[BTREE_POOL_SIZE];
int pool_used;
unsigned long free_head;
unsigned long root;
unsigned long count;
}Fields
high-water mark
freed nodes, chained through children[0]
pool index + 1 (0 = empty tree)
key-value pairs
Methods
Initialise (or reset) an empty tree in place. Only the scalar fields are touched — pool nodes are claimed lazily, so a ~pool-sized memset (or a by-value constructor copying the whole pool) would be pure waste.
insert or overwrite; 0 if the pool is full
null if missing
the removed value, or null
ascending key order
drop every value; the tree is empty afterwards