NAME
sys/mman.h —
memory management declarations
SYNOPSIS
#include <sys/mman.h>
DESCRIPTION
The following protection options are defined:
- PROT_READ
- Page can be read.
- PROT_WRITE
- Page can be written.
- PROT_EXEC
- Page can be executed.
- PROT_NONE
- Page can not be accessed.
The following flag options are defined:
- MAP_SHARED
- Share changes.
- MAP_PRIVATE
- Changes are private.
- MAP_FIXED
- Interpret addr exactly.
The following flags are defined for msync():
- MS_ASYNC
- Perform asynchronous writes.
- MS_SYNC
- Perform synchronous writes.
- MS_INVALIDATE
- Invalidate mappings.
The following symbolic constants are defined for the mlockall() function:
- MCL_CURRENT
- Lock currently mapped pages.
- MCL_FUTURE
- Lock pages that become mapped.
The symbolic constant MAP_FAILED is defined to indicate a failure from the mmap() function.
The size_t and off_t types are defined as described in <sys/types.h>.
The following are declared in <
sys/mman.h
> as functions and may also be defined as macros. Function prototypes
must be provided for use with an ISO C compiler. int
mlock(const void *, size_t); int mlockall(int); void *mmap(void *, size_t,
int, int, int, off_t); int mprotect(void *, size_t, int); int msync(void *,
size_t, int); int munlock(const void *, size_t); int munlockall(void); int
munmap(void *, size_t); int shm_open(const char *, int, mode_t); int
shm_unlink(const char *);
APPLICATION USAGE
The functions mlock(3) , mlockall(3) , shm_open(3) , and shm_unlink(3) are part of the Realtime Feature Group .
FUTURE DIRECTIONS
None.
SEE ALSO
mlock(3) , mlockall(3) , mmap(3) , mprotect(3) , msync(3) , munmap(3) , shm_open(3) , shm_unlink(3) .