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

Function WasmEdge_ModuleInstanceAddMemory

lib/api/wasmedge.cpp:2644–2653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2642}
2643
2644WASMEDGE_CAPI_EXPORT void WasmEdge_ModuleInstanceAddMemory(
2645 WasmEdge_ModuleInstanceContext *Cxt, const WasmEdge_String Name,
2646 WasmEdge_MemoryInstanceContext *MemoryCxt) noexcept {
2647 if (Cxt && MemoryCxt) {
2648 fromModCxt(Cxt)->addHostMemory(
2649 genStrView(Name),
2650 std::unique_ptr<WasmEdge::Runtime::Instance::MemoryInstance>(
2651 fromMemCxt(MemoryCxt)));
2652 }
2653}
2654
2655WASMEDGE_CAPI_EXPORT void WasmEdge_ModuleInstanceAddGlobal(
2656 WasmEdge_ModuleInstanceContext *Cxt, const WasmEdge_String Name,

Callers 3

createSpecTestModuleFunction · 0.85
TESTFunction · 0.85
mainFunction · 0.85

Calls 2

genStrViewFunction · 0.85
addHostMemoryMethod · 0.80

Tested by 1

TESTFunction · 0.68