Hi,

problem seems to be here :
https://github.com/ericoporto/ags/blob/ags3-emscripten/CMakeLists.txt#L94

linear memory is an array buffer that has a limited size, you need to
explicitly allow growth if you allocate dynamically (=1) and did not
specify TOTAL_MEMORY .
more info here:
https://emscripten.org/docs/optimizing/Optimizing-Code.html#memory-growth

Regards,
Mehdi

On Tue, Oct 20, 2020 at 12:00 PM eri0o o <[email protected]> wrote:

> If code is needed this can be seen here:
>
> https://ericoporto.github.io/agsjs/
>
> Code that was used to generate that:
> https://github.com/ericoporto/ags/tree/ags3-emscripten
>
> You can see it crash after 25 allocations of managed objects, which is
> this line here:
>
>
> https://github.com/ericoporto/ags/blob/9e9229fc26fcce9f365e2a60f0f87e20a298113c/Engine/ac/dynobj/managedobjectpool.cpp#L158
>
> On Tue, Oct 20, 2020, 00:11 eri0o o <[email protected]> wrote:
>
>> Hello,
>>
>> I am using std::unordered_map<const char*,int32_t> and my wasm result has
>> a really slow insert time. Is there something to that I should be aware of?
>> My code crashes after 25 inserts for lack of memory, no matter what.
>>
>> It's a bit crazy because everything else works great.
>>
>> Regards,
>>
>> Érico
>>
> --
> 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/CAG1KTJdxCi2PE6xZLMwWeyBdmMd%2BzQ_ed6x-HNe0nOB0kqkq5A%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAG1KTJdxCi2PE6xZLMwWeyBdmMd%2BzQ_ed6x-HNe0nOB0kqkq5A%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/CANLCay%3DRhLMm3NSooBxPFLRjRswZCCMeBC8nG854vzVPs5Ls1Q%40mail.gmail.com.

Reply via email to