Expand description
Kovan: High-performance wait-free memory reclamation for lock-free data structures. Bounded memory usage, predictable latency.
Kovan implements the safe and transparent memory reclamation algorithm, providing snapshot-free memory reclamation with zero overhead on read operations.
§Key Features
- Zero Read Overhead: Object loads require only a single atomic read
- Lock-Free Progress: System-wide progress guaranteed
- Slot-Based Architecture: Fixed slots, not per-thread structures
- Batch Retirement: Efficient amortized reclamation cost
§Example
use std::sync::atomic::Ordering;
use kovan::{pin, retire, Atomic};
let atomic = Atomic::new(Box::into_raw(Box::new(42)));
// Enter critical section
let guard = pin();
// Load with zero overhead (single atomic read)
let ptr = atomic.load(Ordering::Acquire, &guard);
// Access safely within guard lifetime
unsafe {
if let Some(value) = ptr.as_ref() {
println!("Value: {}", value);
}
}
drop(guard);Structs§
- Atomic
- A pointer to a heap-allocated value with atomic operations.
- Birth
Era - Birth era for a node
- Guard
- RAII guard representing an active critical section
- Retired
Node - Node structure embedded in user’s data structure
- Shared
- A pointer to a heap-allocated value protected by a guard.
Enums§
- Ordering
- Atomic memory orderings
Traits§
- Reclaimable
- Trait for types that can be reclaimed
Functions§
- current_
era - Get current global era
- pin
- Enter a critical section
- retire
- Retire a node for later reclamation