mman.h
Overview
Related Modules:
Description:
Declares structures and functions for performing memory operations, including memory mapping, remapping, unmapping, and attribute setting.
Since:
1.0
Version:
1.0
Summary
Macros
MAP_FAILED ((void *) -1) |
Indicates the return value of functions such as mmap() when the operation fails. |
MAP_SHARED 0x01 |
Indicates the mapping attribute that the updates to the mapping are visible to other processes mapping the same file and are carried through to the underlying file. This macro is used as an input parameter passed to functions such as mmap(). |
MAP_PRIVATE 0x02 |
Indicates the mapping attribute that the updates to the mapping are not visible to other mapping processes and are not carried through to the underlying file. This macro is used as an input parameter passed to functions such as mmap(). |
MAP_FIXED 0x10 |
Indicates the mapping attribute that specifies the mapping as fixed mapping. This macro is used as an input parameter passed to functions such as mmap(). |
MAP_ANON 0x20 |
Indicates the mapping attribute that specifies the mapping as anonymous mapping without a specified file or device. This macro is used as an input parameter passed to functions such as mmap(). |
Indicates the mapping attribute that specifies the mapping as anonymous mapping without a specified file or device. This macro is the synonym for MAP_ANON and is used as an input parameter passed to functions such as mmap(). |
|
Indicates that no permission is granted to the current process for accessing the mapping area. This macro is used as an input parameter passed to functions such as mmap(). |
|
Indicates that the current process is granted the read permission on the mapping area. This macro is used as an input parameter passed to functions such as mmap(). |
|
Indicates that the current process is granted the write permission on the mapping area. This macro is used as an input parameter passed to functions such as mmap(). |
|
Indicates that the current process is granted the execute permission on the mapping area. This macro is used as an input parameter passed to functions such as mmap(). |
|
Indicates the remapping attribute that allows the mapping to be relocated to a new address. This macro is used as an input parameter passed to functions such as mremap(). |
|
Indicates the remapping attribute that specifies the mapping as fixed mapping. This macro is used as an input parameter passed to functions such as mremap(). |
Functions
mmap (void addr, size_t length, int prot, int flags, int fd, off_t offset) |
Creates a mapping between the virtual address space of the calling process and a file or device. |
munmap (void addr, size_t length) |
Removes all mappings for the specified virtual address space. |
mprotect (void addr, size_t len, int prot) |
Sets protection attributes for the memory pages contained in the memory region starting from addr with the specified length. |
mremap (void old_address, size_t old_size, size_t new_size, int flags,…) |