I think you can do any number up to 2GB, including 2GB - 64Kb. So the limit
isn't 1GB, unless you see that on some specific browser? Could be a bug.

It should soon be possible to do up to 4GB for the initial memory (without
growth), thanks to a spec change,
https://github.com/WebAssembly/spec/pull/1174

On Thu, Aug 20, 2020 at 8:10 AM Prashanth Nethi <prashanth.ne...@gmail.com>
wrote:

> Hi,
>
> I am currently building WASM with the following flags, to enable PThreads
> in Wasm.
> -s USING_PTHREADS=1 -s INITIAL_MEMORY=1999MB -s MAXIMUM_MEMORY=2GB.
>
> This works wonderfully for our use cases! In fact we are able to get 2x
> performance in some cases!
>
> When I checked the max memory that the Wasm could use, with PThreads
> enabled, it got capped at 1 GB. I am seeing that when the WASM is built
> with ALLOW_MEMORY_GROWTH, the Wasm can use upto 2GB. I know that
> ALLOW_MEMORY_GROWTH with USE_PTHREADS is discouraged so can't look at that
> as a possible solution.
>
> Is there anyway I can get Wasm to use 2GB (or even potentially 4GB in the
> future) with PThreads enabled? Is it that I am missing using some
> configuration options?
>
> I am really hoping there is a way to increase the WASM cap to 2GB, as
> using PThreads, solves our use cases in a big way.
>
> Thanks,
> Prashanth Nethi
>
> --
> 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/730a6796-5b14-4a9e-a1d8-298415c67cd1n%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/730a6796-5b14-4a9e-a1d8-298415c67cd1n%40googlegroups.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 emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpTsvoiK%2ByUJCbr%3DKCDk7RMSg2YoakhLoiDB%2B2NF2Y0LBg%40mail.gmail.com.

Reply via email to