pub struct DynamicMemory { /* private fields */ }Expand description
This is an internal-only api.
A Dynamic memory allocates only the minimum amount of memory when first created. Over time, as it grows, it may reallocate to a different location and size.
Dynamic memories are significantly faster to create than static memories and use much less virtual memory, however, they require the WebAssembly module to bounds-check memory accesses.
While, a dynamic memory could use a vector of some sort as its backing memory, we use mmap (or the platform-equivalent) to allow us to add a guard-page at the end to help elide some bounds-checks.
Implementations§
Source§impl DynamicMemory
impl DynamicMemory
Auto Trait Implementations§
impl Freeze for DynamicMemory
impl RefUnwindSafe for DynamicMemory
impl Send for DynamicMemory
impl Sync for DynamicMemory
impl Unpin for DynamicMemory
impl UnwindSafe for DynamicMemory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more