Implement WASM instance restart to handle out of memory error (#81)

* Test case for wasm out of memory error

* Restart wasm instance after N blocks

* Handle out of memory error and re instantiate WASM

* Remove old instance from map before reinstantiating WASM
This commit is contained in:
2021-12-28 16:08:05 +05:30
committed by nabarun
parent 68bc1c00db
commit 198e49e5a0
29 changed files with 181 additions and 63 deletions
+4
View File
@@ -80,3 +80,7 @@ export function testLog (): void {
log.error('Error message', []);
log.critical('Critical message', []);
}
export function testMemory (value: string): void {
log.debug('testMemory value:', [value.slice(0, 10)]);
}