VPN

Type Alias VPN 

Source
pub type VPN<Meta> = PageNumber<Meta, Virtual>;
Expand description

虚拟页号。

Aliased Type§

pub struct VPN<Meta>(/* private fields */);

Implementations§

Source§

impl<Meta: VmMeta> VPN<Meta>

Source

pub const MAX: Self

最大虚拟页号。

Source

pub const fn base(self) -> VAddr<Meta>

虚页的起始地址。

Source

pub fn index_in(self, level: usize) -> usize

虚页在 level 级页表中的位置。

Source

pub fn floor(self, level: usize) -> Self

包含这个虚页的 level 级页表起始地址。

Source

pub fn ceil(self, level: usize) -> usize

不包含这个虚页的 level 级页表起始地址。

Source

pub fn vaddr_range(self, level: usize) -> Range<VAddr<Meta>>

包含这个虚页的 level 级页表容纳的虚页范围。

Source

pub fn align_level(self) -> usize

虚页的对齐级别,使虚页在页表中序号为 0 的最高等级页表的级别。

Trait Implementations§

Source§

impl<Meta: VmMeta> Debug for VPN<Meta>

Source§

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

Formats the value using the given formatter. Read more