Struct os::mm::PageTable

source · []
pub struct PageTable {
    root_ppn: PhysPageNum,
    frames: Vec<FrameTracker>,
}
Expand description

Record root ppn and has the same lifetime as 1 and 2 level PageTableEntry

Fields

root_ppn: PhysPageNumframes: Vec<FrameTracker>

Implementations

Assume that it won’t oom when creating/mapping.

Create an empty PageTable

Temporarily used to get arguments from user space.

Find phsical address by virtual address, create a frame if not exist

Find phsical address by virtual address

Create a mapping form vpn to ppn

Delete a mapping form vpn

Translate VirtPageNum to PageTableEntry

Translate VirtAddr to PhysAddr

Get root ppn

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.