pub struct ZoneStats {Show 23 fields
pub zone_type: ZoneType,
pub base: u64,
pub managed_pages: usize,
pub present_pages: usize,
pub spanned_pages: usize,
pub reserved_pages: usize,
pub allocated_pages: usize,
pub cached_pages: usize,
pub cached_unmovable_pages: usize,
pub cached_movable_pages: usize,
pub free_pages: usize,
pub movable_free_pages: usize,
pub unmovable_free_pages: usize,
pub segment_count: usize,
pub segment_capacity: usize,
pub pageblock_count: usize,
pub unmovable_pageblocks: usize,
pub movable_pageblocks: usize,
pub watermark_min: usize,
pub watermark_low: usize,
pub watermark_high: usize,
pub lowmem_reserve_pages: usize,
pub largest_free_order: Option<u8>,
}Expand description
Snapshot statistics for a single memory zone.
The struct is plain data on purpose so low-level diagnostics and crash paths can snapshot it onto the stack without heap allocation.
Fields§
§zone_type: ZoneTypeZone classification.
base: u64Lowest physical address covered by the zone span.
managed_pages: usizePages currently managed by buddy in this zone.
present_pages: usizePages reported as usable by the firmware map before reservations.
spanned_pages: usizeOuter span in pages, including holes.
reserved_pages: usizePages removed from management during bootstrap.
allocated_pages: usizePages allocated to live callers.
cached_pages: usizeOrder-0 pages currently parked in per-CPU caches.
cached_unmovable_pages: usizeCached pages parked in unmovable per-CPU caches.
cached_movable_pages: usizeCached pages parked in movable per-CPU caches.
free_pages: usizeEffective free pages, including cached pages.
movable_free_pages: usizeFree pages tracked in movable free lists.
unmovable_free_pages: usizeFree pages tracked in unmovable free lists.
segment_count: usizeNumber of populated contiguous segments.
segment_capacity: usizeReserved segment-table capacity.
pageblock_count: usizeTotal number of pageblocks tracked across all segments.
unmovable_pageblocks: usizePageblocks currently tagged unmovable.
movable_pageblocks: usizePageblocks currently tagged movable.
watermark_min: usizeMinimum watermark.
watermark_low: usizeLow watermark.
watermark_high: usizeHigh watermark.
lowmem_reserve_pages: usizeLow-memory reserve kept for lower-priority paths.
largest_free_order: Option<u8>Largest currently available free order.
Implementations§
Source§impl ZoneStats
impl ZoneStats
Sourcepub fn hole_pages(&self) -> usize
pub fn hole_pages(&self) -> usize
Returns the number of hole pages inside the zone span.
Sourcepub fn reserve_floor_pages(&self) -> usize
pub fn reserve_floor_pages(&self) -> usize
Returns the effective reserve floor enforced by policy.
Sourcepub fn available_after_reserve_pages(&self) -> usize
pub fn available_after_reserve_pages(&self) -> usize
Returns the free pages remaining after the reserve floor is discounted.
Sourcepub fn pressure(&self) -> ZonePressure
pub fn pressure(&self) -> ZonePressure
Returns the derived pressure state from the current zone watermarks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZoneStats
impl RefUnwindSafe for ZoneStats
impl Send for ZoneStats
impl Sync for ZoneStats
impl Unpin for ZoneStats
impl UnsafeUnpin for ZoneStats
impl UnwindSafe for ZoneStats
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
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>
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>
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