-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Option to limit memory usage #211
Comments
Currently implementing this in my fork and I stumpled over 2 problems:
So max_memory between 2kb-24.5kb causes some not very nice bugs. |
Sounds like a great idea. We could probably avoid initialisation time crashes by disabling the limitation until the Lua runtime is initialised. I think that's a fair thing to do: apply the limit only to memory that the user can control, not something that Lupa needs. |
Sounds good, I'll finish writing tests and then work on that. |
I'd love to see an option to limit the max memory usage of a single LuaRuntime.
Lua supports passing a custom allocator function to
lua_newstate
which could refuse to allocate more memory when the limit is reached.An example of this can be found here on stackoverflow.
The text was updated successfully, but these errors were encountered: