Thank you. But is there any way to allocate memory and release it from JavaScript and then pass it to C++. If from C++ side it is impossible.
понедельник, 28 августа 2017 г., 19:16:15 UTC+3 пользователь [email protected] написал: > > Hi, > I am porting comlex logic inside C++ to WASM. > When I run it in browser. It looks like there is no memory release at all > till I reload page. > I even tried it on simple program. > I usually allocate memory with new operator and release it with delete > inside C++ code. But browser does not release memory. > I tested it on Chrome and Firefox. > I used -s ALLOW_MEMORY_GROWTH. But the logic is complex and sometimes it > takes 2 GB RAM to fulfill operations and then browser stops executing > script. > I know that emscripten allocate big part of memory for all operations. But > when I use this algorithm on my PC from console it takes 100 - 200 MB RAM. > > Is there any chance to make emscripten release memory imidiately from C++ > code. Or this is a bug ? > -- 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.
