pub unsafe extern "C" fn WasmEdge_CallingFrameGetMemoryInstance(
    Cxt: *const WasmEdge_CallingFrameContext,
    Idx: u32
) -> *mut WasmEdge_MemoryInstanceContext
Expand description

Get the memory instance by index from the module instance of the current calling frame.

By default, a WASM module only have one memory instance after instantiation. Therefore, developers can use: WasmEdge_CallingFrameGetMemoryInstance(Cxt, 0) to get the memory instance in host function body. This extension is for the WASM multiple memories proposal. After enabling the proposal, there may be greater than 1 memory instances in a WASM module. So developers can use this function to access the memory instances which are not in 0 index.

\param Cxt the WasmEdge_CallingFrameContext. \param Idx the index of memory instance in the module instance.

\returns the memory instance, NULL if not found.