Trait Mappable

Source
pub trait Mappable {
    // Required methods
    fn physical_length_to_virtual_length(
        &self,
        physical_length: NonZero<usize>,
    ) -> NonZero<usize>;
    fn physical_start_offset_from_virtual(&self) -> isize;
}
🔬This is a nightly-only experimental API. (kernel_mmap_trait #24)
Available on non-crate feature use_std only.
Expand description

Basic operations to decide how to map memory together.

Implementations of this can be used to instantiate a RawMapping.

Required Methods§

Source

fn physical_length_to_virtual_length( &self, physical_length: NonZero<usize>, ) -> NonZero<usize>

🔬This is a nightly-only experimental API. (kernel_mmap_trait #24)

The amount of virtual memory required to create a mapping with physical_length Frames

Source

fn physical_start_offset_from_virtual(&self) -> isize

🔬This is a nightly-only experimental API. (kernel_mmap_trait #24)

The number of Pages to offset the physical memory into the allocated virtual memory

Implementors§