Trait memory_set::MappingBackend

source ·
pub trait MappingBackend<F: Copy, P>: Clone {
    // Required methods
    fn map(
        &self,
        start: VirtAddr,
        size: usize,
        flags: F,
        page_table: &mut P,
    ) -> bool;
    fn unmap(&self, start: VirtAddr, size: usize, page_table: &mut P) -> bool;
}
Expand description

Underlying operations to do when manipulating mappings within the specific MemoryArea.

The backend can be different for different memory areas. e.g., for linear mappings, the target physical address is known when it is added to the page table. For lazy mappings, an empty mapping needs to be added to the page table to trigger a page fault.

Required Methods§

source

fn map( &self, start: VirtAddr, size: usize, flags: F, page_table: &mut P, ) -> bool

What to do when mapping a region within the area with the given flags.

source

fn unmap(&self, start: VirtAddr, size: usize, page_table: &mut P) -> bool

What to do when unmaping a memory region within the area.

Object Safety§

This trait is not object safe.

Implementors§