Function sodiumoxide::utils::mlock[][src]

pub fn mlock(x: &mut [u8]) -> Result<(), ()>
Expand description

mlock() locks memory given region which can help avoiding swapping the sensitive memory region to disk.

Operating system might limit the amount of memory a process can mlock(). This function can fail if mlock() fails to lock the memory.