| 2942 | } |
| 2943 | |
| 2944 | WASMEDGE_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 | |
| 2959 | WASMEDGE_CAPI_EXPORT void |
| 2960 | WasmEdge_MemoryInstanceDelete(WasmEdge_MemoryInstanceContext *Cxt) noexcept { |