MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_Result WasmEdge_MemoryInstanceGrowPage

Function WasmEdge_Result WasmEdge_MemoryInstanceGrowPage

lib/api/wasmedge.cpp:2944–2957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2942}
2943
2944WASMEDGE_CAPI_EXPORT WasmEdge_Result WasmEdge_MemoryInstanceGrowPage(
2945 WasmEdge_MemoryInstanceContext *Cxt, const uint64_t Page) noexcept {
2946 return wrap(
2947 [&]() -> WasmEdge::Expect<void> {
2948 if (fromMemCxt(Cxt)->growPage(Page)) {
2949 return {};
2950 } else {
2951 spdlog::error(WasmEdge::ErrCode::Value::MemoryOutOfBounds);
2952 return WasmEdge::Unexpect(
2953 WasmEdge::ErrCode::Value::MemoryOutOfBounds);
2954 }
2955 },
2956 EmptyThen, Cxt);
2957}
2958
2959WASMEDGE_CAPI_EXPORT void
2960WasmEdge_MemoryInstanceDelete(WasmEdge_MemoryInstanceContext *Cxt) noexcept {

Callers

nothing calls this directly

Calls 4

wrapFunction · 0.85
UnexpectFunction · 0.85
growPageMethod · 0.80
errorFunction · 0.50

Tested by

no test coverage detected