Function nc::mlockall

source ·
pub unsafe fn mlockall(flags: i32) -> Result<(), Errno>
Expand description

Lock memory.

§Example

let ret = unsafe { nc::mlockall(nc::MCL_CURRENT) };
// We got out-of-memory error in CI environment.
assert!(ret.is_ok() || ret == Err(nc::ENOMEM));