posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
POSIX_MEMORY_PROTECTION

POSIX Memory Protection option group. More...

Functions

int mprotect (void *addr, size_t len, int prot)
 Change the protection of a memory mapping.
 

Detailed Description

POSIX Memory Protection option group.

Function Documentation

◆ mprotect()

int mprotect ( void *  addr,
size_t  len,
int  prot 
)

Change the protection of a memory mapping.

Parameters
addrBase address of the region (must be page-aligned).
lenLength of the region in bytes.
protNew memory protection (PROT_* flags).
Returns
0 on success, or -1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/mprotect.html