lua-users home
lua-l archive

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


On Wednesday 27, Antonio Vieiro wrote:
> 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?

I would recommend using the Emergency GC [1] patch I made for Lua 5.1.x
It allows you to set a max memory limit on each lua state.

1. http://lua-users.org/wiki/EmergencyGarbageCollector

-- 
Robert G. Jakabosky