pub struct BuddyStats {
pub total_allocations: u64,
pub total_deallocations: u64,
pub successful_allocations: u64,
pub failed_allocations: u64,
pub split_operations: u64,
pub merge_operations: u64,
pub fragmentation_ratio: f64,
pub average_allocation_time_ns: f64,
pub peak_allocated_blocks: usize,
pub current_allocated_blocks: usize,
pub internal_fragmentation: f64,
pub external_fragmentation: f64,
}Expand description
Buddy allocator statistics
Fields§
§total_allocations: u64§total_deallocations: u64§successful_allocations: u64§failed_allocations: u64§split_operations: u64§merge_operations: u64§fragmentation_ratio: f64§average_allocation_time_ns: f64§peak_allocated_blocks: usize§current_allocated_blocks: usize§internal_fragmentation: f64§external_fragmentation: f64Implementations§
Source§impl BuddyStats
impl BuddyStats
pub fn record_allocation( &mut self, success: bool, time_ns: u64, size_requested: usize, size_allocated: usize, )
pub fn record_deallocation(&mut self)
pub fn record_split(&mut self)
pub fn record_merge(&mut self)
pub fn get_success_rate(&self) -> f64
pub fn get_fragmentation_ratio(&self) -> f64
Trait Implementations§
Source§impl Clone for BuddyStats
impl Clone for BuddyStats
Source§fn clone(&self) -> BuddyStats
fn clone(&self) -> BuddyStats
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 moreSource§impl Debug for BuddyStats
impl Debug for BuddyStats
Source§impl Default for BuddyStats
impl Default for BuddyStats
Source§fn default() -> BuddyStats
fn default() -> BuddyStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BuddyStats
impl RefUnwindSafe for BuddyStats
impl Send for BuddyStats
impl Sync for BuddyStats
impl Unpin for BuddyStats
impl UnsafeUnpin for BuddyStats
impl UnwindSafe for BuddyStats
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