aerys / minko

3D framework for web, desktop and mobile devices.
http://minko.io
Other
906 stars 210 forks source link

Emscripten TOTAL_MEMORY doesn't get picked up #201

Closed fjallraven closed 9 years ago

fjallraven commented 9 years ago

Running master + emscripten 1.29.0 + Windows

This can be tested by replacing the geo in assimp example with a huge geometry file. (and removing the animation calls..... ;)) Error:

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 134217728, (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.

So I updated the emcc postbuild with -s TOTAL_MEMORY=536870912. Clean, build, but getting exactly the same error no matter what. (value always repeated)

Any ideas?

Thank you!

warrenseine commented 9 years ago

If you build with make config=html5_release verbose=1, do you see your change in the command line?

Make sure you regenerate the solution when you change a command line parameter.

Note that the new recommended way to manage memory limits is ALLOW_MEMORY_GROWTH. This will be enabled by default in Emscripten in a few days.

JMLX42 commented 9 years ago

TOTAL_MEMORY is set in the HTML template. If you to customize it, edit the value is the JS code of the template.html file in the root dir of your app.

fjallraven commented 9 years ago

Ah thanks guys, the emcc was printing out the correct value passed in so was a bit confused.

So memory growth wont cause much slow down? So it should be safe to use incoming with minko?

JMLX42 commented 9 years ago

So memory growth wont cause much slow down? So it should be safe to use incoming with minko?

In our experience memory growth is fine. We will actually use it in production.

The next version of the engine will also come with a much (much!) lower memory footprint.