comp.lang.ada
 help / color / mirror / Atom feed
From: wtanksle@sdcc10.ucsd.edu (William Tanksley)
Subject: Re: Question about garbage collection
Date: 1998/04/21
Date: 1998-04-21T00:00:00+00:00	[thread overview]
Message-ID: <6hiv42$spu$1@news1.ucsd.edu> (raw)
In-Reply-To: dewar.893163406@merv


In article <dewar.893163406@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:

><<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.

I don't really care for this definition.  It omits the possibility of
generational or otherwise incremental GC.  These are both very powerful
and useful GC methods.

>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.

In the same way that any heuristic algorithm can achieve its goal --
usually outperforming the exact algorithm by an amazing amount.

Honestly, I think that talking about 'true' GC is strongly misleading.  I
could understand 'strong' GC and 'weak' GC, or 'exact' GC and 'heuristic'
GC, but 'true' and 'false'?  Whew.

Shouldn't be used.  Unless, of course, one is comparing reference counting
to GC...  :-)  Even in a conservative GC, garbage will always _eventually_
be collected, and is never lost.  In reference counting garbage can be
lost.

-Billy




  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
1998-04-21  0:00             ` William Tanksley [this message]
1998-04-24  0:00               ` Robert Dewar
     [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
replies disabled

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