Closed vincent-tr closed 3 years ago
Good find, thanks! Indeed looks like adding a region of memory that is larger than 1GB + 4B (max. size of a single TLSF block is 1GB - 4B, plus two 4B headers overhead) is missing to split the region prior to inserting it somewhere around here.
I'm trying to provide a fixed-sized WebAssembly.Memory object, with the larger possible size. I'm expecting to be able to pass an object with 2GB memory, but it seems to fail with object > 1GB.
Here is my use case:
test.ts
compiled with:
./node_modules/.bin/asc --importMemory test -o test.wasm
main.js
launched with:
node main
Got this error if using config > 1GB
Note that it seems to be related to the size of the GC area itself: if I use memoryBase = 1GB, it works with a memory object of 2GB.