[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 garbage collector
- From: Patrick Donnelly <batrick@...>
- Date: Sat, 14 Aug 2010 21:56:08 -0400
On Sat, Aug 14, 2010 at 9:31 PM, Shawn Fox <shawnkfox@gmail.com> wrote:
> Any chance of adding a way to set a memory cap? This would be very useful
> for me and I'd think others who are building sandbox type environments would
> find it useful as well. I'm using a custom memory allocator right now to
> cap memory usage, but it really ought to be part of the standard API, like
> lua_gc(L, LUA_GCMAXMEMORY, 67108864) or some such...
I agree this would be very nice. It's extremely difficult to do this
in plain Lua sandboxes. It'd be even better for use with the rings
library [1]. (That way the host doesn't have its memory limited.)
[1] http://keplerproject.github.com/rings/
--
- Patrick Donnelly