pub struct FreeSpaceManager { /* private fields */ }Implementations§
Source§impl FreeSpaceManager
impl FreeSpaceManager
pub fn new(strategy: AllocationStrategy) -> Self
pub fn add_free_block(&mut self, offset: u64, size: u32)
Sourcepub fn remove_from_free_list(
&mut self,
offset: u64,
size: u32,
) -> NativeResult<()>
pub fn remove_from_free_list( &mut self, offset: u64, size: u32, ) -> NativeResult<()>
Remove a block from the free list (for slot reclamation during rollback)
This is the inverse of add_free_block - it removes a block that was previously marked as free, effectively reclaiming the slot.
pub fn allocate(&mut self, requested_size: u32) -> NativeResult<u64>
pub fn needs_compaction(&self) -> bool
pub fn compact(&mut self) -> CompactionReport
pub fn stats(&self) -> &AllocationStats
pub fn free_blocks(&self) -> &[FreeBlock]
pub fn total_free_space(&self) -> u64
pub fn largest_free_block(&self) -> Option<u32>
pub fn validate(&self) -> NativeResult<()>
pub fn reset(&mut self)
pub fn export_analysis(&self) -> FreeSpaceAnalysis
Trait Implementations§
Source§impl Clone for FreeSpaceManager
impl Clone for FreeSpaceManager
Source§fn clone(&self) -> FreeSpaceManager
fn clone(&self) -> FreeSpaceManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FreeSpaceManager
impl RefUnwindSafe for FreeSpaceManager
impl Send for FreeSpaceManager
impl Sync for FreeSpaceManager
impl Unpin for FreeSpaceManager
impl UnwindSafe for FreeSpaceManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more