[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua gc in games
- From: "Jonathan Branam" <sspeare@...>
- Date: Mon, 6 Aug 2001 02:43:29 -0700
----- 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