[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: I have a feature request... sandboxing.
- From: Sean Conner <sean@...>
- Date: Wed, 16 Mar 2022 15:51:26 -0400
It was thus said that the Great Lars Müller once stated:
> Yes. All of this is already possible in just Lua (limiting calls can be
> done using debug hooks). The proposed "feature" is oddly specific,
> tailored to a certain usecase.
>
> What I would really like to see for simplifying sandboxing are limits
> usually done at a process level: Limiting memory usage or CPU time of
> Lua programs (including invoked builtin C funcs). But I suppose that's
> out of scope for Lua.
Memory can be controlled using a custom allocator (see lua_Alloc and
lua_newstate()). CPU time is more OS or platform specific though.
-spc