Struct os::mm::memory_set::MapArea
source · 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)
pub fn shrink_to(&mut self, page_table: &mut PageTable, new_end: VirtPageNum)
pub fn append_to(&mut self, page_table: &mut PageTable, new_end: VirtPageNum)
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