Struct wasmtime_runtime::Mmap [−][src]
pub struct Mmap { /* fields omitted */ }Expand description
A simple struct consisting of a page-aligned pointer to page-aligned and initially-zeroed memory and a length.
Implementations
Create a new Mmap pointing to at least size bytes of page-aligned accessible memory.
Creates a new Mmap by opening the file located at path and mapping
it into memory.
The memory is mapped in read-only mode for the entire file. If portions
of the file need to be modified then the region crate can be use to
alter permissions of each page.
The memory mapping and the length of the file within the mapping are returned.
Create a new Mmap pointing to accessible_size bytes of page-aligned accessible memory,
within a reserved mapping of mapping_size bytes. accessible_size and mapping_size
must be native page-size multiples.
Make the memory starting at start and extending for len bytes accessible.
start and len must be native page-size multiples and describe a range within
self’s reserved memory.
Return the allocated memory as a mutable slice of u8.
Return the allocated memory as a mutable pointer to u8.
Returns whether the underlying mapping is readonly, meaning that attempts to write will fault.
Makes the specified range within this Mmap to be read/write.