[][src]Struct wasmer_runtime_core::memory::StaticMemory

pub struct StaticMemory { /* fields omitted */ }

This is an internal-only api.

A static memory allocates 6GB of virtual memory when created in order to allow the webassembly module to contain no bounds-checks.

Additionally, static memories stay at a single virtual address, so there is no need to reload its address on each use.

Static memories take a relatively long time to create, so if memories are short-lived, it's recommended that a dynamic memory is used. There is currently no user-facing api that allows them to select the type of memory used however.

Methods

impl StaticMemory[src]

pub fn size(&self) -> Pages[src]

pub fn grow(
    &mut self,
    delta: Pages,
    local: &mut LocalMemory
) -> Result<Pages, GrowError>
[src]

pub fn as_slice(&self) -> &[u8][src]

pub fn as_slice_mut(&mut self) -> &mut [u8][src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T