MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / set_memory

Method set_memory

crates/wasmtime/src/runtime/vm/instance.rs:486–490  ·  view source on GitHub ↗

Set the indexed memory to `VMMemoryDefinition`.

(&self, index: DefinedMemoryIndex, mem: VMMemoryDefinition)

Source from the content-addressed store, hash-verified

484
485 /// Set the indexed memory to `VMMemoryDefinition`.
486 fn set_memory(&self, index: DefinedMemoryIndex, mem: VMMemoryDefinition) {
487 unsafe {
488 self.memory_ptr(index).write(mem);
489 }
490 }
491
492 /// Return the address of the specified memory at `index` within this vmctx.
493 ///

Callers 1

memory_growMethod · 0.80

Calls 2

memory_ptrMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected