Function rustix::mm::munlock

source ·
pub unsafe fn munlock(ptr: *mut c_void, len: usize) -> Result<()>
Expand description

munlock(ptr, len)—Unlock memory.

Safety

This function operates on raw pointers, but it should only be used on memory which the caller owns, to avoid compromising the mlock invariants of other unrelated code in the process.

Some implementations implicitly round the memory region out to the nearest page boundaries, so this function may unlock more memory than explicitly requested if the memory isn’t page-aligned.

References