3 ms·
I’ve dinkered around Wasm some but am certainly no expert. Were you referring to the initial memory that is allocated from the Wasm code and/or js, etc? Or is t
by runlaszlorun 2y ago
I’ve dinkered around Wasm some but am certainly no expert. Were you referring to the initial memory that is allocated from the Wasm code and/or js, etc? Or is this something set by the Wasm runtime?
I haven’t run it myself but I’ve heard others mention that you can prob get several hundred MB to a GB or so but shouldn’t count in getting near the 4GB limit.
Nonetheless, that’s plenty for my use case and random hacking.
- flohofwoe 2y agoI'm not sure if it's a WASM requirement or specific to some WASM runtimes or compilers. At least in Emscripten you have an INITIAL_MEMORY linker option which describes the initial size of the WASM heap. The program, its static data and the stack need to fit into this initial size. From that point on, any dynamically allocated data is fine because that will grow the WASM heap as needed (up to 4 GB for wasm32).