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

Method data

crates/c-api/include/wasmtime/memory.hh:60–64  ·  view source on GitHub ↗

Returns a `span` of where this memory is located in the host. Note that embedders need to be very careful in their usage of the returned `span`. It can be invalidated with calls to `grow` and/or calls into WebAssembly.

Source from the content-addressed store, hash-verified

58 /// `span`. It can be invalidated with calls to `grow` and/or calls into
59 /// WebAssembly.
60 Span<uint8_t> data(Store::Context cx) const {
61 auto *base = wasmtime_memory_data(cx.ptr, &memory);
62 auto size = wasmtime_memory_data_size(cx.ptr, &memory);
63 return {base, size};
64 }
65
66 /// Grows the memory by `delta` WebAssembly pages.
67 ///

Callers

nothing calls this directly

Calls 2

wasmtime_memory_dataFunction · 0.85

Tested by

no test coverage detected