On Tue, Jul 2, 2019 at 8:02 PM Александр Гурьянов <[email protected]> wrote:
>
> Hi. I am trying to set TOTAL_MEMORY to 32mb, but compiler told me:
>
> shared:ERROR: Memory is not large enough for static data (30099056)
> plus the stack (5242880), please increase TOTAL_MEMORY (33554432) to
> at least 35342960
>
> Is there any way to find what and where this data located?

What exactly are you asking for?  Do you want to find our what
constructs in your source are generating 30099056 bytes of static
data?  There is a tool called twiggy that might help:
https://github.com/rustwasm/twiggy.  It mostly focuses on code size
and I'm not sure data symbols are accessible, but it might be of some
help.   You can also inspect you object files with wasm-objdump or try
passing `-Wl,--verbose` at link time and the linker reports some data
layout information.

If you want to reduce your overall memory you could reduce your stack
size by setting, e.g `-s TOTAL_STACK=1M`.   Most programs don't need
5Mb of stack.

>
> 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].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVHzwER66gCjAVPpccE%2Bu%3DaFMk6J65zGa46_cdpvqpLfSQ%40mail.gmail.com.
> 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_Tp9wVL0%3D8ei6Ena9byg7%3Dpi_%3DVMsPkF_kTm6oiChkSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to