MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / CompactArena

Class CompactArena

rust/src/compact_arena.rs:23–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21/// Uses Vec<T> with a separate free list and generation tracking
22#[derive(Debug)]
23pub struct CompactArena<T> {
24 /// Direct storage without Option wrapper
25 storage: Vec<T>,
26 /// Free slot indices for reuse
27 free_list: Vec<usize>,
28 /// Generation counter for safety (optional)
29 generation: u32,
30 /// Track which slots are actually allocated
31 allocated_mask: Vec<bool>,
32}
33
34impl<T> CompactArena<T> {
35 /// Create a new empty compact arena

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected