[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Garbage collection best practices
- From: Antonio Vieiro <antonio@...>
- Date: Wed, 27 Jul 2011 16:50:59 +0200
Hi all,
I did some load tests on a lua program (a *C* program that uses
different Lua VMs, each on its own thread) and I've seen memory
increasing to around 1Gb (possibly my Window's memory limit or
something), and then falling quickly to 64Mb or so.
I've been looking at the LuaFAQ but I couldn't find an appropriate
answer, so here I go:
a) Can I limit the max memory a Lua VM uses? How?
b) If my C program serves "requests", shall I...
b.1) Invoke lua_gc(L, LUA_GCCOLLECT) after each request?
b.2) b.1 is too heavy, I whould do the same with LUA_GCSTEP
b.3) I shouldn't modify GC default settings.
b.4) Call lua_gc with LUA_GCCOLLECT after X requests served
Thanks in advance,
Antonio