Function rustix::mm::mprotect

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

mprotect(ptr, len, flags)—Change the protection flags of a region of memory.

§Safety

The range of memory starting at ptr and extending for len bytes, rounded up to the applicable page size, must be valid to read with ptr’s provenance.

§References