lua-users home
lua-l archive

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


| > 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 idea is more that you only collect the "young" generation most of the
| time (a "minor" collection), and then collect the "old" generation when
| you're really running out of heap (a "major" collection).

Am I right in thinking that this would be a bit of a headache for Lua because it
uses mark and sweep, as opposed to ref counting? You couldnt just walk mark the
minors as the majors might reference them. I'm not advocating reference
counting!