[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: garbage collection thoughts... again?!
- From: David Olofson <david@...>
- Date: Thu, 29 May 2003 17:48:41 +0200
On Thursday 29 May 2003 07.47, Thatcher Ulrich wrote:
> In case anyone is interested, I've written down my current thoughts
> about garbage collection (not necessarily specific to Lua),
> including a nice succinct quote by Ken Thompson. Executive
> summary: ref-counting is good. Here's the longer version:
>
> http://tulrich.com/geekstuff/ref-counting-is-good.txt
>
> I know the Lua authors have said they're working on incremental +
> generational collection. I don't know how far along that work is,
> but I'm throwing this into the pot in case it's interesting or
> helpful.
Well, I used to think reference counting was the easiest way, but the
more I think about it, the less interesting it looks, at least for
hard real time environment.
For example, consider an algorithm that builds big structures (lists,
trees or whatever), and then throws them away every now and then, as
they're no longer needed. With plain refcounting, this would result
in major stalls whenever a large structure is released. So, the
recursive part that finds all "children" of a dereferenced node has
to be incremental.
And then there's the circular reference problem, of course.
I'm suspecting that fixing the issues with ref counting results in a
more complex solution than an incremental GC with similar
performance.
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -'
--- http://olofson.net --- http://www.reologica.se ---