memkit 0.2.0-beta.1

Deterministic, intent-driven memory allocation for systems requiring predictable performance
Documentation
//! Checkpoint and speculative allocation support.

/// A checkpoint for speculative allocation.
///
/// Allows saving the allocator state and rolling back.
pub struct MkCheckpoint {
    saved_head: usize,
}

impl MkCheckpoint {
    /// Create a new checkpoint.
    pub(crate) fn new(head: usize) -> Self {
        Self { saved_head: head }
    }

    /// Get the saved head position.
    pub fn saved_head(&self) -> usize {
        self.saved_head
    }
}