So for our automated regression tests, we allocate 1 gb of memory on the heap since some of our really long replays take quite a bit more memory than our “normal application” (we test memory regressions separately). Now I know we can’t just override memory from javascript for webassembly (it’s baked into the webassembly binary), but even when I build an empty scene with the heap size set to more than 512 mb (I’ve tried 640, 768, 1024, 1023, etc.) I get this error in chrome (the numbers will be slightly different depending on what heap size I set):
And on Firefox:
Is this the expected behavior? Are there “special heap size values” for webassembly that I just don’t know? The “javascript versions” (i.e. if we turn off webassembly) work fine with those heap sizes set.
Whoops this one is on me. I misunderstood and thought “TOTAL_MEMORY” override was ignored for webassembly. Turns out it’s not ignored! The override just doesn’t work when it’s mismatched to whatever was set when the webassembly binary was built. Sorry about that!