Skip to main content

Vma

Struct Vma 

Source
pub struct Vma {
    pub start_addr: VirtAddr,
    pub end_addr: VirtAddr,
    pub flags: VmaFlags,
}
Expand description

A type representing virtual memory areas

Important: end_addr is exclusive

Fields§

§start_addr: VirtAddr§end_addr: VirtAddr§flags: VmaFlags

Implementations§

Source§

impl Vma

Source

pub fn contains(&self, addr: VirtAddr) -> bool

Checks whether the VMA contains/manages a specific address

Source

pub fn size(&self) -> u64

Returns the size of memory that is managed by this VMA

Source

pub fn overlaps(&self, other: &Vma) -> bool

Check whether two VMAs overlap

Trait Implementations§

Source§

impl Borrow<VirtAddr> for Vma

Source§

fn borrow(&self) -> &VirtAddr

Returns a reference to Vma::start_addr to make it possible for [BTreeSet] to compare it with a VirtAddr directly

Source§

impl Eq for Vma

Source§

impl Ord for Vma

Source§

fn cmp(&self, other: &Self) -> Ordering

Compares only Vma::start_addr and no other property

1.21.0 (const: unstable)§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable)§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable)§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for Vma

Source§

fn eq(&self, other: &Self) -> bool

Only checks equality for Vma::start_addr and no other property

1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for Vma

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

Delegates to Vma::cmp

1.0.0 (const: unstable)§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable)§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable)§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable)§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

§

impl Freeze for Vma

§

impl RefUnwindSafe for Vma

§

impl Send for Vma

§

impl Sync for Vma

§

impl Unpin for Vma

§

impl UnsafeUnpin for Vma

§

impl UnwindSafe for Vma

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.