pub struct MemorySet {
page_table: PageTable,
areas: Vec<MapArea>,
}Expand description
address space
Fields§
§page_table: PageTable§areas: Vec<MapArea>Implementations§
source§impl MemorySet
impl MemorySet
sourcepub fn insert_framed_area(
&mut self,
start_va: VirtAddr,
end_va: VirtAddr,
permission: MapPermission
)
pub fn insert_framed_area( &mut self, start_va: VirtAddr, end_va: VirtAddr, permission: MapPermission )
Assume that no conflicts.
fn push(&mut self, map_area: MapArea, data: Option<&[u8]>)
sourcefn map_trampoline(&mut self)
fn map_trampoline(&mut self)
Mention that trampoline is not collected by areas.
sourcepub fn new_kernel() -> Self
pub fn new_kernel() -> Self
Without kernel stacks.
sourcepub fn from_elf(elf_data: &[u8]) -> (Self, usize, usize)
pub fn from_elf(elf_data: &[u8]) -> (Self, usize, usize)
Include sections in elf and trampoline and TrapContext and user stack, also returns user_sp_base and entry point.
sourcepub fn translate(&self, vpn: VirtPageNum) -> Option<PageTableEntry>
pub fn translate(&self, vpn: VirtPageNum) -> Option<PageTableEntry>
Translate a virtual page number to a page table entry
Auto Trait Implementations§
impl RefUnwindSafe for MemorySet
impl Send for MemorySet
impl Sync for MemorySet
impl Unpin for MemorySet
impl UnwindSafe for MemorySet
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more