-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource limits #33
Comments
I think this is reasonable since for example JVM has this functionality. Current wain implementation tries to use memory until hitting bad alloc. But some use case would want to limit memory usage in some restricted environment.
Does it mean steps? This doesn't sound very useful for me since I'm not able to come up with actual use case. Currently wain is under development as I wrote in README.md. The current main goal is passing all official spec tests. After reaching the milestone, I think we can start to consider some functionalities like memory usage limit. |
Our use case would be to be able to stop wasm programs that got stuck in infinite loops, or even just super long running programs. I think it would also work if there were some way to tell the engine to shut down even though it still has more wasm to process. This way if the engine is running in a thread, another thread could tell it to safely shut down. |
I see. It would be useful to have execution steps limit and/or timeout. I'll keep this issue open to consider the functionality in the future. Thank you for the point. |
Once an execution is started, as a caller I have no control over the amount of memory and CPU time that is being used. Do you think it would be reasonable to
The execution limit could potentially be made possible without any such limit existing in the engine by exposing more internal api so instead of just invoking
invoke
and waiting for the result, some API for driving each step could be exposed.The text was updated successfully, but these errors were encountered: