Get free memory
I am trying to optimize the program I am working on and I've noticed that there is a method to get total RAM installed, but no method to get used/free memory. Is this a conscious decision, or just wasn't implemented?
I tried implementing it, but I don't understand how to get access to the wasm instance from the syscall context.
https://doc.rust-lang.org/beta/core/arch/wasm32/fn.memory_size.html can be used, but, AFAIU, this doesn't account for stack and executable usage
Edited by Nickie S.