Grows the memory by `delta` WebAssembly pages. On success returns the previous size of this memory in units of WebAssembly pages.
| 68 | /// On success returns the previous size of this memory in units of |
| 69 | /// WebAssembly pages. |
| 70 | Result<uint64_t> grow(Store::Context cx, uint64_t delta) const { |
| 71 | uint64_t prev = 0; |
| 72 | auto *error = wasmtime_memory_grow(cx.ptr, &memory, delta, &prev); |
| 73 | if (error != nullptr) { |
| 74 | return Error(error); |
| 75 | } |
| 76 | return prev; |
| 77 | } |
| 78 | |
| 79 | /// Returns the size of a page, in bytes, for this memory. |
| 80 | /// |
nothing calls this directly
no test coverage detected