On Tue, Jul 6, 2010 at 23:28, Guillaume Yziquel
<guillaume.yziq...@citycable.ch> wrote:
>> And, of course, any ideas or help on the garbage collector(s) issue are
>> welcome.
> I do not know much about Lua's GC. My experience (for R, Python and Java) is
> that it's doable.

The GC implemented in Lua [1] is an incremental mark-and-sweep
collector. Since Lua type system is simple (nil, boolean, number,
string, function, userdata, thread, for coroutines, and tables) it
automatically collects everything without problems. The strategy for
basic types is to copy values from the C (or OCaml) side to the Lua
stack: this copy decouples the two GC and sets them free to deallocate
values.

Problems arise when one tries to share userdata or closures between
OCaml and Lua. In this case it's not clear (at least to me) how to
approch the problem.



[1] http://www.lua.org/manual/5.1/manual.html#2.10


-- 
Paolo ⠠⠵

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to