comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Question about garbage collection
Date: 1998/04/21
Date: 1998-04-21T00:00:00+00:00	[thread overview]
Message-ID: <dewar.893163406@merv> (raw)
In-Reply-To: ErqJro.9BI@world.std.com


<<Probably.  I believe Robert Dewar doesn't much like so-called
"conservative" gc.  I tend to agree -- it seems like a hack that's
required for languages like C, which are not designed to make gc easy.
And for compilers designed without gc in mind (whether or not the
language is).  And it makes me uneasy that memory can't be compacted.
>>

I never said that! In fact I find the conservative GC approach a clever one,
but it is important not to confuse it with real GC, such as is found in a
typical Modula-3, Algol-68, SNOBOL4, LISP or Java system.

With true GC, you have an invariant that after a collection, an object is
not present if it is not referenced, and you can analyze worst case
storage requirements on this basis. Obviously no such analysis is possible
with conservative GC.

But as I said before, if the primary reason for GC is to improve performance
by reducing memory requirements, then conservative GC is a cheap way to 
achieve this goal.

Whether it is a hack is a point of view. THe point is that the constraints
on the use of malloc and free are pretty simple to state, and the collector
itself is fairly simple, so this approach has the advantage of avoiding a
lot of the implementaiton complexity that is common in trying to provide
true GC for high level languages.





  parent reply	other threads:[~1998-04-21  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-18  0:00 Question about garbage collection Centaury
1998-04-18  0:00 ` Matthew Heaney
1998-04-19  0:00   ` Ed Falis
1998-04-19  0:00     ` Robert Dewar
1998-04-20  0:00       ` Fergus Henderson
1998-04-20  0:00         ` Robert Dewar
1998-04-21  0:00           ` raw
     [not found]         ` <ErqJro.9BI@world.std.com>
1998-04-21  0:00           ` Robert Dewar [this message]
1998-04-21  0:00             ` William Tanksley
     [not found]               ` <ErvsM0.Bu7@world.std.com>
1998-04-24  0:00                 ` Robert Dewar
     [not found]                   ` <Es39LE.B5o@world.std.com>
1998-04-28  0:00                     ` Robert Dewar
1998-04-24  0:00               ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox