pub fn calculate_memory_usage<TKey, TValue, TConfig>(
btree: &BTree<TKey, TValue, TConfig>,
) -> usizewhere
TKey: Ord,
TConfig: BTreeConfig,Expand description
Calculates the memory usage of the B-tree. Note that it does not inspect keys and values internally. Meaning that if they store pointers internally, the memory they point to is not included.
The memory usage is calculated by summing the allocated memory size of each internal node.
It also does not include the memory usage of the btree struct itself,
i.e. size_of(btree) is not included.