⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

LazyMapping

Struct LazyMapping 

Source
pub struct LazyMapping {
    pub start_vaddr: usize,
    pub size: usize,
    pub flags: PageFlags,
    pub backing: BackingType,
    /* private fields */
}
Expand description

A region of virtual address space registered for demand paging.

No physical frames are allocated when a lazy mapping is created. The first access triggers a page fault, which the demand paging manager resolves by allocating a frame and returning it.

Fields§

§start_vaddr: usize

Start virtual address (page-aligned).

§size: usize

Size in bytes (multiple of PAGE_SIZE).

§flags: PageFlags

Page flags to apply when the page is finally mapped.

§backing: BackingType

Backing type for this mapping.

Implementations§

Source§

impl LazyMapping

Source

pub fn new( start_vaddr: usize, size: usize, flags: PageFlags, backing: BackingType, ) -> Self

Create a new lazy mapping.

Source

pub fn contains(&self, vaddr: usize) -> bool

Check whether a virtual address falls within this mapping.

Auto Trait Implementations§

§

impl Freeze for LazyMapping

§

impl RefUnwindSafe for LazyMapping

§

impl Send for LazyMapping

§

impl Sync for LazyMapping

§

impl Unpin for LazyMapping

§

impl UnwindSafe for LazyMapping

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.