Skip to main content

btree_alloc_node

Function btree_alloc_node 

Source
pub fn btree_alloc_node(
    catalog_data: &mut [u8],
    node_size: usize,
    total_nodes: u32,
) -> Result<u32, FilesystemError>
Expand description

Allocate a free node from the B-tree node bitmap. Sets the bit and returns the node index. Updates nothing else (caller must update header’s free_nodes).