I am working on porting a general purpose media player to Javascript using emscripten. I am compiling to Javascript right now while we wait for stable pthread support in WebAssembly.
My project is building and I can run it, but it crashes with a can't allocate memory exception after a couple of minutes. I realized that it is related to the threads in my application. I have approximately 12 long-lived threads and 3 threads that are relatively short-lived that are stopped and started repeatedly. I have set a pthread pool size of 18, but I keep seeing messages indicating that another worker was allocated for the spawn pool. I initially thought that my threads weren't going away, and that was why I was leaking memory. I know that each worker gets a large chunk of memory. When I build with --threadprofiler I see that most of the threads "have not yet started". I'm not sure if that means the worker is finished and waiting in the pool, or if it has never been started. Either way, why would a new worker be allocated for the pool if there are several that have not yet started? Thanks, -- 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.
