wasm: remove unused "free" function.#404
Conversation
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
|
Will this break older Wasm modules in any way? |
|
Also, I don't understand how we can maintain a stable memory footprint in a long running module without |
|
We immediately pass the memory ownership into VM after requesting it and copying data, so host never holds to any VM-allocated memory. No, it won't break old modules. |
|
Ack. |
|
Does that mean that Wasm holds onto host memory after a memory pressure event? E.g. if module allocates 1GB it cannot give it back to the host? |
Wasm VM allocates the whole linear memory block ("RAM") upfront, but it can grow it as needed (up to configureable maximum). I'm not sure if it can actually shrink it back. |
|
Yeah, but it sounds like we need some memory management capability to restart modules and revoke memory. Otherwise, it's prone to DoS. I can imagine some of our modules allocate based on the data path input. |
|
Yup. |
Signed-off-by: Piotr Sikora piotrsikora@google.com