WasmMemory class abstract

A linear memory (array of bytes) that can be used to share data with the WASM module.

Inheritance

Constructors

WasmMemory()

Properties

hashCode → int
The hash code for this object.
no setterinherited
kind → WasmExternalKind
The kind of this WasmExternal.
no setterinherited
lengthInBytes → int
The current size of the memory in bytes.
no setter
lengthInPages → int
The current size of the memory in pages.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → MemoryTy?
Returns the type of this memory.
no setter
view → Uint8List
A view of the memory as a Uint8List.
no setter

Methods

grow(int deltaPages) → void
Grows the memory by deltaPages pages. May throw if the memory cannot be grown.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
when<T>({required T memory(WasmMemory memory), required T table(WasmTable table), required T global(WasmGlobal global), required T function(WasmFunction function)}) → T
Executes the given function depending on the type of this WasmExternal.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

bytesPerPage → const int
The number of bytes per page in a wasm memory. The maximum size of the memory in pages. WasmMemory.bytesPerPage = 65536 = 2^16 = 64KiB