[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Garbage collection best practices
- From: HyperHacker <hyperhacker@...>
- Date: Thu, 28 Jul 2011 20:49:43 -0600
On Thu, Jul 28, 2011 at 19:43, Robert G. Jakabosky
<bobby@sharedrealm.com> wrote:
> 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
>
>
Does 5.2 also let you set a memory limit?
--
Sent from my toaster.