Out of curiosity, how does pthreads handle this? I'd been under the impression that importing the existing memory was required when instantiating the module on each worker.
-- brion On Wed, Sep 23, 2020, 2:54 PM 'Sam Clegg' via emscripten-discuss < [email protected]> wrote: > I recently made a change to start exporting the table from the WebAssembly > module: > https://github.com/emscripten-core/emscripten/pull/12296 > > I'm hoping to followup with a similar change for the WebAssembly memory > (a.k.a `wasmMemory): > https://github.com/emscripten-core/emscripten/issues/12315 > > If we go ahead with this change it will mean the WebAssembly module is in > charge of creating and exporting the memory rather than JavaScript. One > potential downside here is that it removes the ability to adjust the memory > size and runtime, or supply your own memory (i.e. it removes the ability to > set `wasmMemory` or `INITIAL_MEMORY` on the Module object. > > However there are many upsides to doing this: > - Reduced JS size and complexity > - Consistency with standalone more > - WebAssembly is more self-contained > - Easier to load and run emscripten-built WebAssembly modules in other > environments. > > I'd like to found out how many developers out there are > settings `wasmMemory` or `INITIAL_MEMORY` at runtime to see how likely it > is that we might be able to make this switch. Is possible of course that > we could support both modes.. although I would prefer not to. > > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-fPnnf6bn8hBiETQLehyZ_TRWQOE2vSS9%3DQ7y2B1nd0g%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-fPnnf6bn8hBiETQLehyZ_TRWQOE2vSS9%3DQ7y2B1nd0g%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYT%3D11eBxve_vpnv1J3GvqvT-DeECZJbfv4wsVn8rm7Vd6A%40mail.gmail.com.
