You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a rapid benchmark test file for testing performance with constraints.
When I launch the test, I've this error :
uncaught exception: Assertion: Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ( 20971520), (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.
I think there an error because :
ammo was compiled with TOTAL_MEMORY=52428800 (50Mb), not 20Mb ( 20971520)
setting TOTAL_MEMORY in the source with Ammo.TOTAL_MEMORY=xxxxxxx doesn't work (always 20 Mb instead 50Mb)
The message was misleading about 20MB/50MB, I fixed that now.
The problem with changing Ammo.TOTAL_MEMORY is that it must be done during load of ammo.js - it is fixed at startup, and cannot be changed later (unless you build with ALLOW_MEMORY_GROWTH, which slows things down). What you can do is either (1) change in ammo.js where it says Module.TOTAL_MEMORY||52428800, altering that number will change it, or (2) add this JS code before you load ammo.js: var Module = { TOTAL_MEMORY: ... };, during startup ammo.js will look at the Module object.
I saw the test runner used to do that and set it to 20MB, which is not needed now that the default is 50MB. I removed it from the test runner now.
Hello,
I made a rapid benchmark test file for testing performance with constraints.
When I launch the test, I've this error :
uncaught exception: Assertion: Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ( 20971520), (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.
I think there an error because :
File for test : http://www.stoomm.com/benchconstraint.js (lauch with test.py)
Thanks a lot for your help.
The text was updated successfully, but these errors were encountered: