#[non_exhaustive]#[repr(i32)]pub enum MmapAdvise {
MADV_NORMAL = 0,
MADV_RANDOM = 1,
MADV_SEQUENTIAL = 2,
MADV_WILLNEED = 3,
MADV_DONTNEED = 4,
MADV_FREE = 8,
}
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 = 0
No further special treatment. This is the default.
MADV_RANDOM = 1
Expect random page references.
MADV_SEQUENTIAL = 2
Expect sequential page references.
MADV_WILLNEED = 3
Expect access in the near future.
MADV_DONTNEED = 4
Do not expect access in the near future.
MADV_FREE = 8
Specify that the application no longer needs the pages in the given range.
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 for MmapAdvise
impl PartialEq for MmapAdvise
Source§impl PartialOrd for MmapAdvise
impl PartialOrd for MmapAdvise
impl Copy for MmapAdvise
impl Eq for MmapAdvise
impl StructuralPartialEq for MmapAdvise
Auto Trait Implementations§
impl Freeze for MmapAdvise
impl RefUnwindSafe for MmapAdvise
impl Send for MmapAdvise
impl Sync for MmapAdvise
impl Unpin for MmapAdvise
impl UnwindSafe for MmapAdvise
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)