pub struct MapArea {
vpn_range: SimpleRange<VirtPageNum>,
data_frames: BTreeMap<VirtPageNum, FrameTracker>,
map_type: MapType,
map_perm: MapPermission,
}
Expand description
map area structure, controls a contiguous piece of virtual memory
Fields§
§vpn_range: SimpleRange<VirtPageNum>
§data_frames: BTreeMap<VirtPageNum, FrameTracker>
§map_type: MapType
§map_perm: MapPermission
Implementations§
Source§impl MapArea
impl MapArea
pub fn new( start_va: VirtAddr, end_va: VirtAddr, map_type: MapType, map_perm: MapPermission, ) -> Self
pub fn from_another(another: &Self) -> Self
pub fn map_one(&mut self, page_table: &mut PageTable, vpn: VirtPageNum)
pub fn unmap_one(&mut self, page_table: &mut PageTable, vpn: VirtPageNum)
pub fn map(&mut self, page_table: &mut PageTable)
pub fn unmap(&mut self, page_table: &mut PageTable)
Auto Trait Implementations§
impl Freeze for MapArea
impl RefUnwindSafe for MapArea
impl Send for MapArea
impl Sync for MapArea
impl Unpin for MapArea
impl UnwindSafe for MapArea
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