Function lrs::syscall::mmap

Maps a file into memory.

Syntax

unsafe fn mmap(addr: usize, len: usize, prot: i32, flags: i32, fd: i32, off: u64) -> isize

Arguments

NameDescription
addr

The address at which to map the file.

len

The length of the map.

prot

How the memory will be protected.

flags

Flags used when mapping a file.

fd

The file to map.

off

The offset of the file at which the map is started.

Return value

Returns a pointer to the map or an error value.

See also