Module rustix::mm

source · []
Available on crate feature mm only.
Expand description

Memory map operations.

Structs

MAP_* flags for use with mmap.

PROT_* flags for use with mprotect.

MS_* flags for use with msync.

PROT_* flags for use with mmap.

Enums

POSIX_MADV_* constants for use with madvise.

Functions

posix_madvise(addr, len, advice)—Declares an expected access pattern for a memory-mapped file.

mlock(ptr, len)—Lock memory into RAM.

mmap(ptr, len, prot, flags, fd, offset)—Create a file-backed memory mapping.

mmap(ptr, len, prot, MAP_ANONYMOUS | flags, -1, 0)—Create an anonymous memory mapping.

mprotect(ptr, len, flags)

msync(addr, len, flags)—Declares an expected access pattern for a memory-mapped file.

munlock(ptr, len)—Unlock memory.

munmap(ptr, len)