[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Memory limits
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 9 Oct 2003 11:39:45 -0300
>CPU usage can be monitored through HOOKCOUNT (which works for my
>purposes), however there doesn't appear to be any way to limit memory
>usage easily under the interpreter.
I see two ways of doing this without patching Lua:
1. In your count (or other) hook, call lua_getgccount and raise an error
if too much memory is being used.
2. Recompile lmem.c to use your own memory allocator that refuses to allocate
too much memory.
--lhf