GC (was: kaffe-0.8.x garbage collection problem (at least on m68k))

Tim Wilkinson tim at tjwassoc.demon.co.uk
Wed Mar 12 15:10:27 PST 1997


On Wed, 12 Mar 1997 forsyth at plan9.cs.york.ac.uk wrote:

> >>mine to implement a memory management system which uses ref counting for
> >>"simple" structures (Java Strings, StringBuffers, various kinds of streams
> >>etc.) and some kind of a delayed two-pass traverse for all objects with
> >>non-zero ref count.
> 
> indeed, Limbo/Inferno does use a hybrid scheme, with reference counting
> reclaiming
> non-circular structures immediately, and another mechanism to
> reclaim circular structures.  the more complex collections are done
> concurrently
> with the operation of the system, using a special method,
> since real time systems aren't too keen on being stopped for (say) a
> leisurely sweep-and-mark collection.
> (the predictability of storage management is guaranteed by the language in
> various ways.)

Yes it does and it's quite nice.  However, Limbo (and Dis in particular) have
some notable advantages here.  For one, the machines is memory to memory
rather than stack bases.  This means you don't have to move references to
and from the stack before using them (with the obvious ref++ and ref-- this
involves).  Of course you could optimise this some but I just mention it as
a complication.

Anyway, with a good GC (and the current one is improving all the time as it
get's less and less conservative) which is a little more VM and generationally
aware I'd have thought we'd be looking at similar speed impacts.  And as for
realtime GC, well there are other ways to look at than other than reference
counting.

Tim

--
  Tim Wilkinson                         Tel/Fax: +44 181 440 0658
  T. J. Wilkinson & Associates,         Mobile:  +44 370 621006
  London, UK.                           Email:   tim at tjwassoc.demon.co.uk



More information about the kaffe mailing list