Sounds like you want to manage your own stack? It's very simple, just look at how STACKTOP is handled in emscripten output. We pre-allocate a region for the stack, then push/pop at function entry/exit.
- Alon On Sat, Jan 24, 2015 at 7:30 AM, Stéphane Letz <[email protected]> wrote: > Hi, > > > We are compiling to asm.js code in our Faust DSP compiler (so producing > our own asm.js modules). Then we either interact with the Emscripten > runtime, so using its memory manager (Module._malloc/Module._free…), or > using our own simple memory manager when we don't need to embed the > complete Emscripten runtime. > > > In our asm.js code, it is not clear yet how we could possibly define stack > allocated arrays. I see this STACKTOP stuff in Emscripten runtime code (so > I understand that Emscripten runtime allocated a block of memory to the > handle the stack yes?), but what to do in if we don't interact with the > Emscripten runtime? Do we need to manage our own stack in a similar way as > Emscripten runtime does? Or are they any simpler recommended way? > > > Thanks. > > > Stéphane Letz > > > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
