Freeing/Shrinking memory · Issue #1300 · WebAssembly/design (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
I have a Wasm project which parses a large chunk of textual data (~40mb). First, I reserve enough space to write the data over to Wasm's memory. Next, I run the Wasm module and process the data.
The problem is, that freeing the input/output memory doesn't actually shrink Wasm's memory. The memory keeps growing based on the largest allocation. In my project, I eventually end up having +200mb of wasted RAM.
- Are there any plans to support memory shrinking?
- I would be fine with a way to explicitly destroy a Wasm instance (so garbage collecting all its memory), but couldn't find one