#[repr(C, align(4096))]
pub struct PageTable<Meta: MmuMeta>(_);
Expand description

页表。

Implementations

空白页表。

页表长度。

总长度,而非有效项的数量。这是一个常量。

如果页表中至少一个项有效,返回 true

获取指向第一个页表项的指针。

source

pub fn set_entry(
    &mut self,
    vaddr: VAddr,
    entry: Pte<Meta>,
    level: usize
) -> Result<(), EntryError>

将此页表视为一个 level 级页表,设置一个页表项。

页表项保证查找虚地址 vaddr 时能找到页表项 entry 指向的物理页(可以是页或子页表)。

Errors
  • 如果 level 大于当前方案下最大的页表级别,产生 InvalidLevel
  • 如果 entrylevel 级页表中表示一个巨页但物理页号未对齐,产生 LeafMisaligned

查询页表一次。

Trait Implementations

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.