memory.ml is currently using OCaml's Bigarray module, specifically Bigarray.Array1, to represent linear memory.
Bigarray's interfaces all use OCaml's int type for array extents and index values. While int has a host-dependent size, it is 31 bits on some common systems. It is also signed, so it can only hold values less than 1<<30.
Consequently, on 32-bit hosts, it seems the WebAssembly reference interpreter is limited to linear memory sizes less than 1 GiB, even when the underlying host is capable of allocating that much memory.
Am I understanding everything here correctly? And if so, are there any alternatives to Bigarray which allow for bigger sizes?