From 86e4250a23d4ca445c30f89956ed1b6e060e08c9 Mon Sep 17 00:00:00 2001 From: Kobi Gurkan Date: Tue, 25 Jun 2019 12:15:19 +0300 Subject: [PATCH] Fix memory requirement to not crash chrome --- src/groth16.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groth16.js b/src/groth16.js index 9cffdc9..ac7c304 100644 --- a/src/groth16.js +++ b/src/groth16.js @@ -179,7 +179,7 @@ async function build() { groth16.n32 = groth16.n64*2; groth16.n8 = groth16.n64*8; - groth16.memory = new WebAssembly.Memory({initial:10000}); + groth16.memory = new WebAssembly.Memory({initial:5000}); groth16.i32 = new Uint32Array(groth16.memory.buffer); const wasmModule = await WebAssembly.compile(groth16_wasm.code); @@ -247,7 +247,7 @@ async function build() { const copyCode = groth16_wasm.code.buffer.slice(0); initPromises.push(groth16.postAction(i, { command: "INIT", - init: 10000, + init: 5000, code: copyCode }, [copyCode]));