int
mprotect(void *addr, size_t len, int prot)
)
system call
changes the specified pages to have protection
prot.
Not all implementations will guarantee protection on a page basis;
the granularity of protection changes may be as large as an entire region.
The protections (region accessibility) are specified in the
prot
argument by
OR'ing
the following values:
PROT_EXECPROT_READPROT_WRITEPROT_NONEEACCES]PROT_EXECUTE
flag was attempted on pages which belong to a filesystem mounted with the
NOEXEC flag.
EINVAL]ENOMEM]).
)
function first appeared in
4.4BSD.