Function linux_api::mman::mmap

source ·
pub unsafe fn mmap(
    addr: *mut c_void,
    length: usize,
    prot: ProtFlags,
    flags: MapFlags,
    fd: RawFd,
    offset: usize,
) -> Result<*mut c_void, Errno>
Expand description

Make the mmap syscall, with a thin layer of type-safety over mmap_raw. See mmap(2).

§Safety

Can clobber existing memory. See mmap(2).