nix::sys::mman

Function mmap

Source
pub unsafe fn mmap(
    addr: Option<NonZeroUsize>,
    length: NonZeroUsize,
    prot: ProtFlags,
    flags: MapFlags,
    fd: RawFd,
    offset: off_t,
) -> Result<*mut c_void>
Expand description

allocate memory, or map files or devices into memory

ยงSafety

See the mmap(2) man page for detailed requirements.