Freeing/Shrinking memory · Issue #1300 · WebAssembly/design (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@maierfelix

Description

@maierfelix

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.