pub enum FramePurpose {
PageTable,
KernelData,
UserData,
Custom(u32),
}Expand description
Describes the intended purpose of an allocated frame.
Purpose is written into FrameMeta::flags with Ordering::Release so
that any concurrent reader of the metadata (e.g. a TLB-shootdown handler
deciding whether a frame holds a page-table node) sees a consistent view.
Variants§
PageTable
Frame will hold a kernel page-table node (PML4/PDPT/PD/PT).
These frames MUST be zeroed : unzeroed page-table nodes are the primary source of non-deterministic RIP at Ring 3 transition.
KernelData
Frame belongs to kernel address-space (e.g. heap, stack, metadata).
UserData
Frame belongs to a user-space address-space (anonymous or file-backed).
Custom(u32)
Caller-managed; raw flags are passed through unchanged.
Implementations§
Source§impl FramePurpose
impl FramePurpose
Sourcepub fn requires_zero(self) -> bool
pub fn requires_zero(self) -> bool
Returns true if this purpose requires zeroing regardless of the
zeroed option. Page-table nodes must always be zeroed.
Trait Implementations§
Source§impl Clone for FramePurpose
impl Clone for FramePurpose
Source§fn clone(&self) -> FramePurpose
fn clone(&self) -> FramePurpose
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FramePurpose
impl Debug for FramePurpose
Source§impl PartialEq for FramePurpose
impl PartialEq for FramePurpose
impl Copy for FramePurpose
impl Eq for FramePurpose
impl StructuralPartialEq for FramePurpose
Auto Trait Implementations§
impl Freeze for FramePurpose
impl RefUnwindSafe for FramePurpose
impl Send for FramePurpose
impl Sync for FramePurpose
impl Unpin for FramePurpose
impl UnsafeUnpin for FramePurpose
impl UnwindSafe for FramePurpose
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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