Function rustix::io::mmap
pub unsafe fn mmap<Fd: AsFd>(ptr: *mut c_void, len: usize, prot: ProtFlags, flags: MapFlags, fd: &Fd, offset: u64) -> io::Result<*mut c_void>Documentation
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.