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.
pub unsafe fn from_definition(
memory: &MemoryType,
style: &MemoryStyle,
vm_memory_location: NonNull<VMMemoryDefinition>
) -> Result<Self, MemoryError>
[src]
pub unsafe fn from_definition(
memory: &MemoryType,
style: &MemoryStyle,
vm_memory_location: NonNull<VMMemoryDefinition>
) -> Result<Self, MemoryError>
[src]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
Returns the type for this memory.
Returns the memory style for this memory.
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
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more