Enum nix::sys::mman::MmapAdvise
source · #[non_exhaustive]#[repr(i32)]pub enum MmapAdvise {
Show 17 variants
MADV_NORMAL = 0,
MADV_RANDOM = 1,
MADV_SEQUENTIAL = 2,
MADV_WILLNEED = 3,
MADV_DONTNEED = 4,
MADV_REMOVE = 9,
MADV_DONTFORK = 10,
MADV_DOFORK = 11,
MADV_HWPOISON = 100,
MADV_MERGEABLE = 12,
MADV_UNMERGEABLE = 13,
MADV_SOFT_OFFLINE = 101,
MADV_HUGEPAGE = 14,
MADV_NOHUGEPAGE = 15,
MADV_DONTDUMP = 16,
MADV_DODUMP = 17,
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
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_REMOVE = 9
Free up a given range of pages and its associated backing store.
MADV_DONTFORK = 10
Do not make pages in this range available to the child after a fork(2)
.
MADV_DOFORK = 11
Undo the effect of MADV_DONTFORK
.
MADV_HWPOISON = 100
Poison the given pages.
Subsequent references to those pages are treated like hardware memory corruption.
MADV_MERGEABLE = 12
Enable Kernel Samepage Merging (KSM) for the given pages.
MADV_UNMERGEABLE = 13
Undo the effect of MADV_MERGEABLE
MADV_SOFT_OFFLINE = 101
Preserve the memory of each page but offline the original page.
MADV_HUGEPAGE = 14
Enable Transparent Huge Pages (THP) for pages in the given range.
MADV_NOHUGEPAGE = 15
Undo the effect of MADV_HUGEPAGE
.
MADV_DONTDUMP = 16
Exclude the given range from a core dump.
MADV_DODUMP = 17
Undo the effect of an earlier MADV_DONTDUMP
.
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
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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,
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
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)
clone_to_uninit
)