I did some small test with the new 4GB memory limit for browser with unity 6 (previously this was capped at 2GB). You can find the build used for the test here: 6000.0.31f1-webgl2-4gbmemory (3.36 MB). To compare with the default 2GB memory you can choose from a lot of builds here: WebGL Loading Test Builds
I have a few findings that I didn’t expect:
- Somehow the 4GB memory limit worked for me on Firefox, even though there is this open bug that notes that firefox does not support it. But pushing the memory up through allocating byte arrays seems to be no problem, so not sure what is happening here (As you can see in the screenshots below, the HEAP8 size also shows that it goes above the 2GB without problems)
- The page just ends in an endless loop when allocating above the 4GB memory limit - For both Firefox and Chrome. With 2GB you will get a popup right away that the heap grew too big, but for 4GB this is not the case (See screenshtos).
For the first - Why is this the case? I tried the simple repro from the bugzilla page, and firefox still throws an error. Did unity find a workaround here? (If so I guess it would make sense to remove the warning from the player settings)
For the second - I guess it would make sense to have the same behavior as with 2GB - Is this planned / known already?