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

Method memory_ptr

crates/wasmtime/src/runtime/vm/instance.rs:497–502  ·  view source on GitHub ↗
(&self, index: DefinedMemoryIndex)

Source from the content-addressed store, hash-verified

495 /// the vmctx.
496 #[inline]
497 pub fn memory_ptr(&self, index: DefinedMemoryIndex) -> NonNull<VMMemoryDefinition> {
498 unsafe {
499 self.vmctx_plus_offset::<VmPtr<_>>(self.offsets().vmctx_vmmemory_pointer(index))
500 .as_non_null()
501 }
502 }
503
504 /// Return the indexed `VMGlobalDefinition`.
505 pub fn global_ptr(&self, index: DefinedGlobalIndex) -> NonNull<VMGlobalDefinition> {

Callers 4

hash_keyMethod · 0.80
memoryMethod · 0.80
set_memoryMethod · 0.80

Calls 3

as_non_nullMethod · 0.45
offsetsMethod · 0.45

Tested by

no test coverage detected