Function mlock
Source pub unsafe fn mlock(addr: NonNull<c_void>, length: size_t) -> Result<()>
Available on crate feature mman only.
Expand description
Locks all memory pages that contain part of the address range with length
bytes starting at addr.
Locked pages never move to the swap area.
ยงSafety
addr must meet all the requirements described in the mlock(2) man page.