pub struct Zone {
pub zone_type: ZoneType,
pub base: PhysAddr,
pub page_count: usize,
pub span_pages: usize,
pub allocated: usize,
pub free_lists: [u64; 12],
pub buddy_bitmaps: [BuddyBitmap; 12],
pub alloc_bitmap: BuddyBitmap,
}Expand description
Memory zone with buddy allocator free lists
Fields§
§zone_type: ZoneTypeZone type
base: PhysAddrBase physical address of this zone
page_count: usizeTotal number of managed pages in this zone.
span_pages: usizeTotal address span covered by this zone metadata, in pages.
Unlike page_count, this includes holes and is used to size bitmaps.
allocated: usizeNumber of allocated pages
free_lists: [u64; 12]Free lists for each order (0-11), intrusive list head as physical addr. 0 means empty.
buddy_bitmaps: [BuddyBitmap; 12]Per-order buddy pair bitmaps (Linux-style parity map).
alloc_bitmap: BuddyBitmapOptional debug bitmap: 1 bit per page = allocated.
Implementations§
Auto Trait Implementations§
impl Freeze for Zone
impl RefUnwindSafe for Zone
impl Send for Zone
impl !Sync for Zone
impl Unpin for Zone
impl UnsafeUnpin for Zone
impl UnwindSafe for Zone
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> 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