#[non_exhaustive]#[repr(i32)]pub enum MmapAdvise {
Show 23 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,
MADV_PAGEOUT = 21,
MADV_COLD = 20,
MADV_WIPEONFORK = 18,
MADV_KEEPONFORK = 19,
MADV_POPULATE_READ = 22,
MADV_POPULATE_WRITE = 23,
}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
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
linux_android only.Free up a given range of pages and its associated backing store.
MADV_DONTFORK = 10
linux_android only.Do not make pages in this range available to the child after a fork(2).
MADV_DOFORK = 11
linux_android only.Undo the effect of MADV_DONTFORK.
MADV_HWPOISON = 100
linux_android only.Poison the given pages.
Subsequent references to those pages are treated like hardware memory corruption.
MADV_MERGEABLE = 12
linux_android only.Enable Kernel Samepage Merging (KSM) for the given pages.
MADV_UNMERGEABLE = 13
linux_android only.Undo the effect of MADV_MERGEABLE
MADV_SOFT_OFFLINE = 101
Preserve the memory of each page but offline the original page.
MADV_HUGEPAGE = 14
linux_android only.Enable Transparent Huge Pages (THP) for pages in the given range.
MADV_NOHUGEPAGE = 15
linux_android only.Undo the effect of MADV_HUGEPAGE.
MADV_DONTDUMP = 16
linux_android only.Exclude the given range from a core dump.
MADV_DODUMP = 17
linux_android only.Undo the effect of an earlier MADV_DONTDUMP.
MADV_FREE = 8
target_os=aix nor target_os=hurd nor Cygwin nor Redox.Specify that the application no longer needs the pages in the given range.
MADV_PAGEOUT = 21
linux_android only.Reclaim the address range when applicable.
MADV_COLD = 20
linux_android only.Deactivate the address range when applicable.
MADV_WIPEONFORK = 18
linux_android only.After fork, the adress range is zero filled.
MADV_KEEPONFORK = 19
linux_android only.Undo MADV_WIPEONFORK when it applied.
MADV_POPULATE_READ = 22
linux_android only.Pre-load the address range for reading to reduce page-fault latency.
MADV_POPULATE_WRITE = 23
linux_android only.Pre-fault the address range for writing to reduce page-fault latency on subsequent writes.
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