lua-users home
lua-l archive

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


We all know that tables, functions, threads, and (full) userdata are
objects in Lua.  I'm wondering how the addresses of such objects are
treated in the Lua runtime system.  In particular, I want to know how
hard it is (or possible at all) to modify the Lua VM so that these
addresses can change at runtime without breaking the execution of the
running Lua program.

The motivation behind this question is that I'm playing with Lua's
incremental mark-and-sweep garbage collector and am wondering if it's
possible to replace it with a moving collector (e.g., a copying
collector).  This is a personal project aiming at learning GC and
having fun.

Thanks in advance.

Harry Xingzhi Pan