Hi guys,I'm trying to investigate a leak in our engine and was wondering why the memory limit would behave differently on mobile and desktop browsers. All mobile browsers crash with a TOTAL_MEMORY exception while desktop browsers don't. I'm especially trying to fix this on iPad, but that's also the case on Android.I thought I understood asm.js and made the following assumptions:
- Before starting the program, Emscripten with asm.js will allocate a big array to simulate the RAM.
- The size of the memory array depends on TOTAL_MEMORY.
- Besides browser-specific optimizations, the allocated / used memory by a program is deterministic.
- If TOTAL_MEMORY is too big for the actual device, the browser will immediately crash.
What I'm experiencing clearly shows that I'm wrong about assumptions #3 and #4, so here's a few questions:
- Do browsers perform some "virtual memory" allocation of the asm.js array? Some trick that would make a 256 MB array not crash in Safari Mobile until being actually filled with data.
- What would be a safe TOTAL_MEMORY value for mobile browsers?
- What's the best technique for memory profiling in JavaScript when using asm.js? Can --profiling help profiling memory if the memory array is preallocated?
- What's the role of the memory initialization file? What does it contain on startup?
--Thanks a lot,Warren.
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Thu, Dec 18, 2014 at 2:00 AM, Warren Seine <warren...@aerys.in> wrote:
- What's the best technique for memory profiling in JavaScript when using asm.js? Can --profiling help profiling memory if the memory array is preallocated?
juj has a memory profiling tool, I don't remember where it is though.
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/eKKLzvbGOpY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.