pub struct SizeClassOccupancy {
pub active_pages: usize,
pub empty_pages: usize,
pub live_allocations: usize,
pub total_slots: usize,
}Expand description
Occupancy counters for a single size class in the current thread allocator.
Fields§
§active_pages: usizePages holding at least one live allocation.
empty_pages: usizePages with no live allocation, retained for reuse rather than returned, so a refill of this size class costs no syscall.
live_allocations: usizeAllocations currently handed out from this size class.
total_slots: usizeSlots across all pages of this size class, live or free.
Against Self::live_allocations this gives the class’s internal
fragmentation: a large gap means pages are pinned by a few
scattered survivors.
Trait Implementations§
Source§impl Clone for SizeClassOccupancy
impl Clone for SizeClassOccupancy
Source§fn clone(&self) -> SizeClassOccupancy
fn clone(&self) -> SizeClassOccupancy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SizeClassOccupancy
Source§impl Debug for SizeClassOccupancy
impl Debug for SizeClassOccupancy
Source§impl Default for SizeClassOccupancy
impl Default for SizeClassOccupancy
Source§fn default() -> SizeClassOccupancy
fn default() -> SizeClassOccupancy
Returns the “default value” for a type. Read more
impl Eq for SizeClassOccupancy
Source§impl PartialEq for SizeClassOccupancy
impl PartialEq for SizeClassOccupancy
impl StructuralPartialEq for SizeClassOccupancy
Auto Trait Implementations§
impl Freeze for SizeClassOccupancy
impl RefUnwindSafe for SizeClassOccupancy
impl Send for SizeClassOccupancy
impl Sync for SizeClassOccupancy
impl Unpin for SizeClassOccupancy
impl UnsafeUnpin for SizeClassOccupancy
impl UnwindSafe for SizeClassOccupancy
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