lua-users home
lua-l archive

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


----- Original Message ----- 
From: "Reuben Thomas" <rrt@dcs.gla.ac.uk>


> ...or Lua could use a generational garbage collector...

Do you have one laying around we could just plug in?

Seriously though, you make it sound so simple. I believe the
work required from the Lua point of view is about the same
given the incremental or generational solution. Both must
still know whenever references change.

I guess a generation GC works similarly to the const data 
idea of mine, but the GC must be smart enough (and have
the cooperation of the VM) to figure out when something in
the const data changes and must then be walked during the
next GC. Perhaps there is a simple way to do this that
I am not aware of?

The const data proposal should be easier to implement 
because it does not rely on changing the VM in any way.
It requires a certain cooperation on the part of the
user to not modify structures that he has marked const.

If the generational solution is easily available, or even
somewhat easily available, I would be quite happy.

-Jonathan