MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_MemoryInstanceCreate

Function WasmEdge_MemoryInstanceCreate

lib/api/wasmedge.cpp:2869–2881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2867// >>>>>>>> WasmEdge memory instance functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2868
2869WASMEDGE_CAPI_EXPORT WasmEdge_MemoryInstanceContext *
2870WasmEdge_MemoryInstanceCreate(
2871 const WasmEdge_MemoryTypeContext *MemType) noexcept {
2872 try {
2873 if (MemType) {
2874 return toMemCxt(new WasmEdge::Runtime::Instance::MemoryInstance(
2875 *fromMemTypeCxt(MemType)));
2876 }
2877 } catch (...) {
2878 handleCAPIError();
2879 }
2880 return nullptr;
2881}
2882
2883WASMEDGE_CAPI_EXPORT const WasmEdge_MemoryTypeContext *
2884WasmEdge_MemoryInstanceGetMemoryType(

Callers 3

createSpecTestModuleFunction · 0.85
TESTFunction · 0.85
mainFunction · 0.85

Calls 2

fromMemTypeCxtFunction · 0.85
handleCAPIErrorFunction · 0.85

Tested by 1

TESTFunction · 0.68