Skip to main content

PageTableMapPlan

Struct PageTableMapPlan 

Source
pub struct PageTableMapPlan<T: TableMeta, A: FrameAllocator> { /* private fields */ }
Expand description

Allocation-free description of where one absent leaf may be installed.

This is captured while the caller has a stable page-table view. It owns no frames and may cross a lock boundary so allocation can happen before the page-table mutation critical section, like Linux’s vmf->prealloc_pte.

Implementations§

Source§

impl<T: TableMeta, A: FrameAllocator> PageTableMapPlan<T, A>

Source

pub const fn vaddr(&self) -> VirtAddr

Source

pub const fn page_size(&self) -> usize

Source

pub fn prepare_path(self) -> PagingResult<Option<PageTablePathDeposit<T, A>>>

Prepares only the missing intermediate directories for this leaf.

Ok(None) means the complete directory path already exists. A returned deposit owns an unreachable, zeroed suffix; publishing it is one bounded parent-entry store and never installs the leaf itself.

Source

pub fn prepare( self, paddr: PhysAddr, config: PteConfigOf<T>, ) -> PagingResult<PageTableMapDeposit<T, A>>

Allocates and initializes every missing table below the captured parent.

No live page-table entry is changed. Failure drops the unpublished partial suffix, so callers either receive a complete move-only deposit or retain the exact pre-prepare page table.

Trait Implementations§

Source§

impl<T: TableMeta, A: FrameAllocator> Debug for PageTableMapPlan<T, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, A> Freeze for PageTableMapPlan<T, A>
where A: Freeze, PhantomData<T>: Freeze,

§

impl<T, A> RefUnwindSafe for PageTableMapPlan<T, A>

§

impl<T, A> Send for PageTableMapPlan<T, A>
where PhantomData<T>: Send,

§

impl<T, A> Sync for PageTableMapPlan<T, A>
where PhantomData<T>: Sync,

§

impl<T, A> Unpin for PageTableMapPlan<T, A>
where A: Unpin, PhantomData<T>: Unpin,

§

impl<T, A> UnsafeUnpin for PageTableMapPlan<T, A>

§

impl<T, A> UnwindSafe for PageTableMapPlan<T, A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.