mirror of
https://github.com/tornadocash/websnark.git
synced 2025-01-15 15:38:28 +01:00
Merge pull request #3 from kobigurk/master
Make memory grow on overflowing allocation
This commit is contained in:
commit
e40bd0b701
@ -68,6 +68,10 @@ function thread(self) {
|
|||||||
while (i32[0] & 3) i32[0]++; // Return always aligned pointers
|
while (i32[0] & 3) i32[0]++; // Return always aligned pointers
|
||||||
const res = i32[0];
|
const res = i32[0];
|
||||||
i32[0] += length;
|
i32[0] += length;
|
||||||
|
while (i32[0] > memory.buffer.byteLength) {
|
||||||
|
memory.grow(100);
|
||||||
|
}
|
||||||
|
i32 = new Uint32Array(memory.buffer);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user