MCPcopy Create free account
hub / github.com/bluejekyll/wasmtime-java / WasmAlloc

Class WasmAlloc

wasmtime-jni/src/ty/wasm_alloc.rs:21–25  ·  view source on GitHub ↗

Allocator that can allocate and deallocate to and from a WASM module. This assumes the existence of `memory` Memory as well as `__alloc_bytes` and `__dealloc_bytes` Funcs are exported from the module.

Source from the content-addressed store, hash-verified

19/// This assumes the existence of `memory` Memory as well as `__alloc_bytes` and `__dealloc_bytes` Funcs
20/// are exported from the module.
21pub(crate) struct WasmAlloc {
22 memory: Memory,
23 alloc: Func,
24 dealloc: Func,
25}
26
27impl WasmAlloc {
28 pub fn from_caller(caller: &mut Caller<JavaState>) -> Option<Self> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…