Struct wasmer_vm::LinearMemory[][src]

pub struct LinearMemory { /* fields omitted */ }
Expand description

A linear memory instance.

Implementations

Create a new linear memory instance with specified minimum and maximum number of wasm pages.

This creates a LinearMemory with owned metadata: this can be used to create a memory that will be imported into Wasm modules.

Create a new linear memory instance with specified minimum and maximum number of wasm pages.

This creates a LinearMemory with metadata owned by a VM, pointed to by vm_memory_location: this can be used to create a local memory.

Safety
  • vm_memory_location must point to a valid location in VM memory.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the type for this memory.

Returns the memory style for this memory.

Returns the number of allocated wasm pages.

Grow memory by the specified amount of wasm pages.

Returns None if memory can’t be grown by the specified amount of wasm pages.

Return a VMMemoryDefinition for exposing the memory to compiled wasm code.

Returns the size of the referenced value in bytes. Read more

We must implement this because of VMMemoryDefinitionOwnership::VMOwned. This is correct because synchronization of memory accesses is controlled by the VM.

This is correct because all internal mutability is protected by a mutex.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type for metadata in pointers and references to Self.

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.