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

Method getMemory

include/runtime/instance/module.h:376–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374 return TabInsts[Idx];
375 }
376 Expect<MemoryInstance *> getMemory(uint32_t Idx) const noexcept {
377 std::shared_lock Lock(Mutex);
378 if (Idx >= MemInsts.size()) {
379 // Error logging needs to be handled by the caller.
380 return Unexpect(ErrCode::Value::WrongInstanceIndex);
381 }
382 return unsafeGetMemory(Idx);
383 }
384 MemoryInstance *unsafeGetMemory(uint32_t Idx) const noexcept {
385 return MemInsts[Idx];
386 }

Callers 1

getMemoryByIndexMethod · 0.45

Calls 2

UnexpectFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected