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

Method data_ptr

crates/wasmtime/src/runtime/memory.rs:479–484  ·  view source on GitHub ↗

Returns the base pointer, in the host's address space, that the memory is located at. For more information and examples see the documentation on the [`Memory`] type. # Panics Panics if this memory doesn't belong to `store`.

(&self, store: impl AsContext)

Source from the content-addressed store, hash-verified

477 ///
478 /// Panics if this memory doesn't belong to `store`.
479 pub fn data_ptr(&self, store: impl AsContext) -> *mut u8 {
480 store.as_context()[self.instance]
481 .memory(self.index)
482 .base
483 .as_ptr()
484 }
485
486 /// Returns the byte length of this memory.
487 ///

Callers 6

guards_presentFunction · 0.80
assert_guardsFunction · 0.80
assert_behaves_wellFunction · 0.80
set_up_memoryFunction · 0.80
wasm_memory_dataFunction · 0.80

Calls 3

as_ptrMethod · 0.45
memoryMethod · 0.45
as_contextMethod · 0.45

Tested by 1

set_up_memoryFunction · 0.64