Function cloudabi::mem_map [] [src]

pub unsafe fn mem_map(
    addr_: *mut (),
    len_: usize,
    prot_: mprot,
    flags_: mflags,
    fd_: fd,
    off_: filesize,
    mem_: &mut *mut ()
) -> errno

Creates a memory mapping, making the contents of a file accessible through memory.

Parameters

addr: If FIXED is set, specifies to which address the file region is mapped. Otherwise, the mapping is performed at an unused location.

len: The length of the memory mapping to be created.

prot: Initial memory protection options for the memory mapping.

flags: Memory mapping flags.

fd: If ANON is set, this argument must be MAP_ANON_FD. Otherwise, this argument specifies the file whose contents need to be mapped.

off: If ANON is set, this argument must be zero. Otherwise, this argument specifies the offset within the file at which the mapping starts.

mem: The starting address of the memory mapping.