lua-users home
lua-l archive

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


On Tue, Feb 14, 2012 at 10:03 PM, cynthia powers <powcyn@gmail.com> wrote:
> On Wed, Feb 15, 2012 at 12:13 AM, Sam Roberts <vieuxtech@gmail.com> wrote:
>> You might find this one easier to backport from 5.1:
>>
>> http://lua-users.org/wiki/EmergencyGarbageCollector
>
> Thanks Sam. Isn't it default in 5.2?
Sure, but its not likely to be a simple cut-n-paste from one code base
to the other.

> Was it for some specific design issues
> that you recommend picking it up from 5.1.4, or simply because it would be
> easier to diff the file?

You won't be able to figure out what parts of lua5.2 are related to
emergency garbage collection, not easily, anyhow.

Since the patch above is already specific to your needs, it might be
easier to understand and integrate. Have you tried it? You might get
really lucky, and find it almost applies cleanly.

Also, lua 5.2 changed a lot from 5.1, particularly in the core
language and gc (ephemeron tables). Its been a while, but I recall 5.0
and 5.1 being much more similar, and 5.1 can be compiled to be
backwards compatible for almost every change.

You didn't say why upgrading wasn't an option, though its the obvious
way to get this feature. Upgrading to 5.1 should be very easy. 5.2
might be harder, depends on your situation.

Cheers,
Sam