README

April 17, 2013 ยท View on GitHub

gclua

This is a modified version of Lua 5.1.5 that uses the Boehm garbage collector (http://www.hpl.hp.com/personal/Hans_Boehm/gc/).

For at least one allocation-heavy program there is a 2x speedup over standard Lua, but on average there seems to be a slight slowdown and moderately increased memory usage.

The main advantage of using libgc is that it makes managing memory over the Lua-C boundary much easier (as long as the C side also uses libgc). Data allocated with lua_newuserdata can be used in C code without having to keep it alive in Lua. It should also be possible to store Lua values directly in C data, without going via lua_ref.

To build, first ensure that a recent version of libgc (>=v7.2alpha7) is installed, then build in the same way as the standard Lua distribution (e.g. "make generic").

Weak tables and the __gc metamethod are not currently supported.