pub struct MemoryMapConfig {
pub mode: MemoryMapMode,
pub access_pattern: AccessPattern,
pub use_huge_pages: bool,
pub numa_node: i32,
pub populate: bool,
pub lock_memory: bool,
pub read_ahead_size: usize,
}Expand description
Configuration for memory mapping
Fields§
§mode: MemoryMapModeAccess mode
access_pattern: AccessPatternAccess pattern hint
use_huge_pages: boolUse huge pages if available
numa_node: i32NUMA node preference (-1 for any)
populate: boolPopulate pages immediately (vs lazy)
lock_memory: boolLock pages in memory
read_ahead_size: usizeRead-ahead size in bytes
Implementations§
Source§impl MemoryMapConfig
impl MemoryMapConfig
Sourcepub fn with_mode(self, mode: MemoryMapMode) -> Self
pub fn with_mode(self, mode: MemoryMapMode) -> Self
Set access mode
Sourcepub fn with_access_pattern(self, pattern: AccessPattern) -> Self
pub fn with_access_pattern(self, pattern: AccessPattern) -> Self
Set access pattern
Sourcepub fn with_huge_pages(self, enable: bool) -> Self
pub fn with_huge_pages(self, enable: bool) -> Self
Enable huge pages
Sourcepub fn with_numa_node(self, node: i32) -> Self
pub fn with_numa_node(self, node: i32) -> Self
Set NUMA node
Sourcepub fn with_populate(self, populate: bool) -> Self
pub fn with_populate(self, populate: bool) -> Self
Set populate flag
Sourcepub fn with_lock_memory(self, lock: bool) -> Self
pub fn with_lock_memory(self, lock: bool) -> Self
Set lock memory flag
Sourcepub fn with_read_ahead_size(self, size: usize) -> Self
pub fn with_read_ahead_size(self, size: usize) -> Self
Set read-ahead size
Trait Implementations§
Source§impl Clone for MemoryMapConfig
impl Clone for MemoryMapConfig
Source§fn clone(&self) -> MemoryMapConfig
fn clone(&self) -> MemoryMapConfig
Returns a duplicate 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 MemoryMapConfig
impl Debug for MemoryMapConfig
Auto Trait Implementations§
impl Freeze for MemoryMapConfig
impl RefUnwindSafe for MemoryMapConfig
impl Send for MemoryMapConfig
impl Sync for MemoryMapConfig
impl Unpin for MemoryMapConfig
impl UnsafeUnpin for MemoryMapConfig
impl UnwindSafe for MemoryMapConfig
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