pub struct BuddyStats {
pub allocations: AtomicU64,
pub deallocations: AtomicU64,
pub allocated_bytes: AtomicUsize,
pub peak_allocated_bytes: AtomicUsize,
pub splits: AtomicU64,
pub merges: AtomicU64,
pub failed_allocations: AtomicU64,
}Use jemalloc feature instead. See buddy_allocator module docs for migration.
Expand description
Statistics for the buddy allocator
Fieldsยง
ยงallocations: AtomicU64Use jemalloc feature instead. See buddy_allocator module docs for migration.
Total allocations
deallocations: AtomicU64Use jemalloc feature instead. See buddy_allocator module docs for migration.
Total deallocations
allocated_bytes: AtomicUsizeUse jemalloc feature instead. See buddy_allocator module docs for migration.
Current allocated bytes
peak_allocated_bytes: AtomicUsizeUse jemalloc feature instead. See buddy_allocator module docs for migration.
Peak allocated bytes
splits: AtomicU64Use jemalloc feature instead. See buddy_allocator module docs for migration.
Number of splits
merges: AtomicU64Use jemalloc feature instead. See buddy_allocator module docs for migration.
Number of merges
failed_allocations: AtomicU64Use jemalloc feature instead. See buddy_allocator module docs for migration.
Failed allocations
Implementationsยง
Sourceยงimpl BuddyStats
impl BuddyStats
pub fn new() -> Self
Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn record_allocation(&self, size: usize)
Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn record_deallocation(&self, size: usize)
Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn record_split(&self)
Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn record_merge(&self)
Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn record_failed_allocation(&self)
Use jemalloc feature instead. See buddy_allocator module docs for migration.