[plt-scheme] Some thoughts about GC and realtime aplications

From: Greg Pettyjohn (gregp at ccs.neu.edu)
Date: Mon May 22 10:04:10 EDT 2006

On Sat, 20 May 2006, jepri wrote:

> This is a perl developer's reasons for why Perl6 would be not be using
> reference counting (Perl5 does).
> http://perlmonks.org/?node_id=193354
> It's a wonderfully complete answer even though it lacks citations or
> benchmarks.

It is *almost* wonderfully complete but neglects two important
shortcomings of ref counting:
1. Ref counting can lead to arbitrary pause times when dereferencing an
object leads to a large deallocation or deallocation of a large number of
objects (imagine derefing the first element in a long linked list of big

2. In a naive implementation (typical of c/c++ "smart" pointers), the same
scenario can lead to unbounded stack use (in the absence of tail calls).
Besides being an example of how ref-counting can be inneficient and cause
long pauses, it is also a nice example of the need for proper tail calls.

Posted on the users mailing list.