#include <sys/mman.h>
|
int
mprotect (const void *addr, size_t len, int prot); |
NOTE: This interface is currently not functional and only build supported. This is because of the fact that, mmap used for mapping, internally uses shared memory facility provided by the platform and shared memory interface does not support dynamic modification of memory protections.
Currently these protection bits are known, which can be combined, OR’d together:
PROT_NONE | No permissions at all. |
PROT_READ | The pages can be read. |
PROT_WRITE | |
The pages can be written. | |
PROT_EXEC | The pages can be executed. |
[EINVAL] | |
The virtual address range specified by the addr and len arguments is not valid. | |
[EACCES] | |
The calling process was not allowed to change the protection to the value specified by the prot argument. | |
© 2005-2007 Nokia |