pub trait MemLock { fn mlock(&mut self) -> Result<()>; fn munlock(&mut self) -> Result<()>; }
A trait for locking pages in memory
Exposes the mlock and munlock functions of Linux. Locking prevents the OS from swapping to disk or moving to a different NUMA node.
mlock
munlock
See man 2 mlock for more information.
man 2 mlock
Lock memory
Unlock memory