devela::_dep::rustix::mm

Function mprotect

pub unsafe fn mprotect(
    ptr: *mut c_void,
    len: usize,
    flags: MprotectFlags,
) -> Result<(), Errno> 
Available on crate feature dep_rustix only.
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