Enum nix::sys::mman::MmapAdvise
source · #[repr(i32)]
#[non_exhaustive]
pub enum MmapAdvise {
MADV_NORMAL,
MADV_RANDOM,
MADV_SEQUENTIAL,
MADV_WILLNEED,
MADV_DONTNEED,
MADV_FREE,
MADV_ZERO_WIRED_PAGES,
MADV_FREE_REUSABLE,
MADV_FREE_REUSE,
MADV_CAN_REUSE,
}
Available on crate feature
mman
only.Expand description
Usage information for a range of memory to allow for performance optimizations by the kernel.
Used by madvise
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MADV_NORMAL
No further special treatment. This is the default.
MADV_RANDOM
Expect random page references.
MADV_SEQUENTIAL
Expect sequential page references.
MADV_WILLNEED
Expect access in the near future.
MADV_DONTNEED
Do not expect access in the near future.
MADV_FREE
Specify that the application no longer needs the pages in the given range.
MADV_ZERO_WIRED_PAGES
Indicates that the application will not need the data in the given range.
MADV_FREE_REUSABLE
Pages can be reused (by anyone).
MADV_FREE_REUSE
Caller wants to reuse those pages.
MADV_CAN_REUSE
Trait Implementations§
source§impl Clone for MmapAdvise
impl Clone for MmapAdvise
source§fn clone(&self) -> MmapAdvise
fn clone(&self) -> MmapAdvise
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MmapAdvise
impl Debug for MmapAdvise
source§impl Hash for MmapAdvise
impl Hash for MmapAdvise
source§impl Ord for MmapAdvise
impl Ord for MmapAdvise
source§fn cmp(&self, other: &MmapAdvise) -> Ordering
fn cmp(&self, other: &MmapAdvise) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<MmapAdvise> for MmapAdvise
impl PartialEq<MmapAdvise> for MmapAdvise
source§fn eq(&self, other: &MmapAdvise) -> bool
fn eq(&self, other: &MmapAdvise) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<MmapAdvise> for MmapAdvise
impl PartialOrd<MmapAdvise> for MmapAdvise
source§fn partial_cmp(&self, other: &MmapAdvise) -> Option<Ordering>
fn partial_cmp(&self, other: &MmapAdvise) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more