ebx |
Pointer to a properly initialized mmap_arg_struct structure:
struc mmap_arg_struct
{
.addr rd 1
.len rd 1
.prot rd 1
.flags rd 1
.fd rd 1
.offset rd 1
} |
mmap_arg_struct members:
addr
Address where pages will be mapped. If it's non-zero, it is used as a hint to the system. (As a convenience to the system, the actual address of the region may differ from the address supplied.) If it's zero, an address will be selected by the system.
len
Size of the mapped region.
prot
Protection flags:
PROT_EXEC |
Pages may be executed. |
PROT_READ |
Pages may be read. |
PROT_WRITE |
Pages may be written. |
|
flags
Mode flags:
MAP_ANON |
Map anonymous memory not associated with any specific file. The file descriptor used for creating MAP_ANON regions is used only for naming, and may be specified as -1 if no name is associated with the region. |
MAP_FILE |
Mapped from a regular file or character-special device memory. (This is the default mapping type, and need not be specified.) |
MAP_FIXED |
Do not permit the system to select a different address than the one specified. If the specified address cannot be used, sys_mmap will fail. If MAP_FIXED is specified, ebx must be a multiple of the pagesize. Use of this option is discouraged. |
MAP_HASSEMAPHORE |
Notify the kernel that the region may contain semaphores and that special handling may be necessary. |
MAP_PRIVATE |
Modifications are private. |
MAP_SHARED |
Modifications are shared. |
|
fd
File descriptor. See mode flags descriptions for more info.
offset
Offset (within the file) of the data to be mapped. It's ignored if MAP_ANON is specified.
|