pub trait MemLock {
    fn mlock(&mut self) -> Result<()>;
fn munlock(&mut self) -> Result<()>; }
Expand description

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.

See man 2 mlock for more information.

Required methods

Lock memory

Unlock memory

Implementors