🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clu
Article #36

Re: Garbage Collection in CLU-question

#36
From: Stephen Crawley
Date: Tue, 11 Apr 1989 08:39
31 lines
2034 bytes
> 1) Does anybody know some reports about [CLU GC's] realisation?

There is a MIT internal document on the implementation of CLU.  I can't
remember its title (and my copy has gone walkabout), but the author
is Sharon Pearl.

Among the gems of useful information in this note are a description
of CLU object formats and an outline of the garbage collection algorithm.

> 2) [Suggestion to have the GC replace identical instances of an imutable 
> type with one instance]

In most real cases this optimisation would give little space saving.  
On the down side, the runtime cost would be considerable.  Every heap
node would need a type field which would need to be initialised, the
GC would need to do extra work for every node (i.e. to check if it was 
immutable).  Finally for each immutable type (with N instances), it will 
cost a minumum of order N (when all instamces are identical) and probably
Nlog(N) to eliminate the duplicates.  The duplicate elimination algorithm 
would need to be applied of times to get optimal space saving.

There are also "theological" issues here.  Are two equal valued but 
distinct instances of an immutable type truely identical?  If you stick
to the operations defined in the CLU RM, they probably are.  But if you
use some of the other code supplied by MIT (e.g. the _cvt function), equal 
valued instances of an immutable type are distinguishable.

[I admit it ... I'm a hacker :-)]

-- Steve
Technical Details
Message-ID: <706@scaup.cl.cam.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!kth!draken!tut!ra!moj
References: <677@tuvie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!kth!draken!tut!ra!moj
From: scc@cl.cam.ac.uk (Stephen Crawley)
Newsgroups: comp.lang.clu
Subject: Re:  Garbage Collection in CLU-question
Keywords: sharing of immutable objects
Message-ID: <706@scaup.cl.cam.ac.uk>
Date: 11 Apr 89 08:39:24 GMT
References: <677@tuvie>
Sender: moj@ra.abo.fi
Distribution: inet
Organization: U of Cambridge Comp Lab, UK
Lines: 31
Approved: moj@cs.utu.fi
Source-Info:  From (or Sender) name not authenticated.
X-Posting-Number: 43