#[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 more