pub unsafe fn mmap_anonymous(
ptr: *mut c_void,
len: usize,
prot: ProtFlags,
flags: MapFlags,
) -> Result<*mut c_void>
Expand description
mmap(ptr, len, prot, MAP_ANONYMOUS | flags, -1, 0)
—Create an anonymous
memory mapping.
For file-backed mappings, see mmap
.
§Safety
If ptr
is not null, it must be aligned to the applicable page size, and
the range of memory starting at ptr
and extending for len
bytes,
rounded up to the applicable page size, must be valid to mutate with
ptr
’s provenance.