Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
How to "compile with -s..." for html5? — Gideros Forum

How to "compile with -s..." for html5?

unlyingunlying Guru
edited January 2017 in General questions
Hi.
I have problem with my game in browser. Sometimes it throw:
"uncaught exception: abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 268435456, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")"

But how to compile with -s?..

Comments

  • hgy29hgy29 Maintainer
    edited January 2017
    Hi, if you wish to compile HTML5 template yourself and add those '-s ...' flags, the build scripts where they are defined is here: https://github.com/gideros/gideros/blob/master/emscripten/Makefile#L87

    Your issue here is that your app memory usage exceed the limit you gave in export export (or maybe 256MB is the default, but you can override it), can't you just enlarge it ?

    Compiling with memory growth enabled causes issues with dynamic loading (plugins), thats why I disabled it in the end.
Sign In or Register to comment.