How about adding an API like: Emscripten_extendStackIfNeeded(callback), which could be inserted anywhere stack depth might be an issue and would launch another coroutine if the stack was almost used up, swap to it, and swap back on return or exception? On Tuesday, May 18, 2021 at 1:21:01 PM UTC-7 s...@google.com wrote:
> I have an open PR to reduce the default stack size in emscripten from 5Mb > to 1Mb, and we are also considering reducing it even furthur (possibly to > 64Kb which is the wasm-ld default, or to 128Kb, which is the musl default): > https://github.com/emscripten-core/emscripten/pull/14177. > > How many folks out there have run into stack limits with the current limit > of 5Mb? How many folks are worried they would run into limits if we reduce > the default to 1Mb, 128Kb or 64Kb? Would those who feel they need more > stack be OK adding `-sTOTAL_STACK` to their link command to request a > higher limit? (feel free to respond there, or on the issue above). > > cheers, > sam > -- 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-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/4444d68e-5d77-448c-9e97-2cf11e8f0e09n%40googlegroups.com.