Function rustix::mm::mmap

source · []
pub unsafe fn mmap<Fd: AsFd>(
    ptr: *mut c_void,
    len: usize,
    prot: ProtFlags,
    flags: MapFlags,
    fd: Fd,
    offset: u64
) -> Result<*mut c_void>
Expand description

mmap(ptr, len, prot, flags, fd, offset)—Create a file-backed memory mapping.

For anonymous mappings (MAP_ANON/MAP_ANONYMOUS), see mmap_anonymous.

Safety

Raw pointers and lots of special semantics.

References