AssemblyScript / assemblyscript

A TypeScript-like language for WebAssembly.
https://www.assemblyscript.org
Apache License 2.0
16.82k stars 655 forks source link

Reset the bump allocator? #2843

Closed tareksander closed 4 months ago

tareksander commented 5 months ago

Question

I don't expect my modules to allocate much dynamic memory, if any, but I'd like to reset it between runs (so I don't have to create a new memory each time). Is this possible?

dcodeIO commented 5 months ago

There is heap.reset() when using the stub runtime. Must make sure that there aren't any pointers into then-zeroed memory, of course, say in globals, perhaps initialized during start.

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!