PageTableNode

Type Alias PageTableNode 

Source
pub type PageTableNode<C> = Frame<PageTablePageMeta<C>>;
Expand description

A smart pointer to a page table node.

This smart pointer is an owner of a page table node. Thus creating and dropping it will affect the reference count of the page table node. If dropped it as the last reference, the page table node and subsequent children will be freed.

PageTableNode is read-only. To modify the page table node, lock and use PageTableGuard.

Aliased Type§

#[repr(transparent)]
pub struct PageTableNode<C> { pub ptr: PPtr<MetaSlot>, pub _marker: PhantomData<PageTablePageMeta<C>>, }

Fields§

§ptr: PPtr<MetaSlot>§_marker: PhantomData<PageTablePageMeta<C>>

Implementations§

Source§

impl<C: PageTableConfig> PageTableNode<C>

Source

pub exec fn level(&self) -> PagingLevel

with
Tracked(perm): Tracked <& PointsTo <MetaSlot,PageTablePageMeta <C>>>,
requires
self.ptr.addr() == perm.addr(),
self.ptr.addr() == perm.points_to.addr(),
perm.is_init(),
perm.wf(),
Source

pub exec fn alloc(level: PagingLevel) -> res : Self

with
Tracked(regions): Tracked <& mut MetaRegionOwners>,
->
owner: Tracked <OwnerSubtree <C>>,
requires
level <= NR_LEVELS(),
old(regions).inv(),
ensures
regions.inv(),

Allocates a new empty page table node.

Trait Implementations§

Source§

impl<C: PageTableConfig> OwnerOf for PageTableNode<C>

Source§

open spec fn wf(self, owner: Self::Owner) -> bool

{
    &&& self.ptr.addr() == owner.meta_perm.addr()

}
Source§

type Owner = NodeOwner<C>

The owner of the concrete type. The Owner must implement Inv, indicating that it must has a consistent state.