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

Function wasmtime_memory_new

crates/c-api/src/memory.rs:90–96  ·  view source on GitHub ↗
(
    store: WasmtimeStoreContextMut<'_>,
    ty: &wasm_memorytype_t,
    ret: &mut Memory,
)

Source from the content-addressed store, hash-verified

88
89#[unsafe(no_mangle)]
90pub extern "C" fn wasmtime_memory_new(
91 store: WasmtimeStoreContextMut<'_>,
92 ty: &wasm_memorytype_t,
93 ret: &mut Memory,
94) -> Option<Box<wasmtime_error_t>> {
95 handle_result(Memory::new(store, ty.ty().ty.clone()), |mem| *ret = mem)
96}
97
98#[unsafe(no_mangle)]
99pub extern "C" fn wasmtime_memory_type(

Callers 2

mainFunction · 0.85
createMethod · 0.85

Calls 4

handle_resultFunction · 0.85
newFunction · 0.50
cloneMethod · 0.45
tyMethod · 0.45

Tested by

no test coverage detected