The best way to do a full reset is just to start all over. You can use
MODULARIZE to put the entire module in a function, and then you create
instances by calling the function. You can then drop references to one and
create another, with a guaranteed pristine memory state.

On Sun, May 22, 2016 at 3:30 AM, Shlomi Fish <[email protected]> wrote:

> Hi all!
>
> I have a problem where running
> freecell_solver_user_alloc()+freecell_solver_user_solve()+freecell_solver_user_free()
> (and some other malloc()s/free()s) many times makes Emscripten eventually
> report (in the console.log) that it cannot malloc memory and my program can
> no longer be run. I suspect this is caused by memory fragmentation and I'm
> seeking a way to reset Emscripten's memory so I can start from a clean
> slate at each iteration. Something like exit()+execve() again in Unix.
>
> Can anyone tell me how to do it? My web searches failed for me on that.
>
> Regards,
>
> -- Shlomi Fish
>
> --
> 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.
>

-- 
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.

Reply via email to