pub struct MemoryMap { /* private fields */ }
Expand description

A memory mapped file or chunk of memory. This is a very system-specific interface to the OS’s memory mapping facilities (mmap on POSIX, VirtualAlloc/CreateFileMapping on Windows). It makes no attempt at abstracting platform differences, besides in error values returned. Consider yourself warned.

The memory map is released (unmapped) when the destructor is run, so don’t let it leave scope by accident if you want it to stick around.

Implementations

Create a new mapping with the given options, at least min_len bytes long. min_len must be greater than zero; see the note on ErrZeroLength.

Granularity that the offset or address must be for MapOffset and MapAddr respectively.

Returns the pointer to the memory created or modified by this map.

Returns the number of bytes this map applies to.

Returns the type of mapping this represents.

Trait Implementations

Unmap the mapping. Panics the task if munmap panics.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.