Function nix::sys::mman::mmap

source ·
pub unsafe fn mmap<F: AsFd>(
    addr: Option<NonZeroUsize>,
    length: NonZeroUsize,
    prot: ProtFlags,
    flags: MapFlags,
    f: F,
    offset: off_t,
) -> Result<NonNull<c_void>>
Expand description

Allocate memory, or map files or devices into memory

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

§Safety

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