lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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