comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Great Circle and Ada?
Date: 1996/09/18
Date: 1996-09-18T00:00:00+00:00	[thread overview]
Message-ID: <DxwpH8.JK1@world.std.com> (raw)
In-Reply-To: 51mj21$jif@watnews1.watson.ibm.com


In article <51mj21$jif@watnews1.watson.ibm.com>,
Norman H. Cohen <ncohen@watson.ibm.com> wrote:
>However, a CONSERVATIVE garbage collector makes guesses about which words
>are pointers precisely because it has no information about how the
>compiler has laid out storage.  The only knowledge exploited by a
>conservative garbage collector is knowledge of the data structure
>(typically boundary tags) used by the run-time system's allocator.

I wouldn't say that's the *only* knowledge.  The conservative GC also
knows (or hopes!) that the compiler represents access types or pointers
or whatever language feature it is using machine addresses.  And that
these machine addresses always point at the data, or perhaps in the
middle of the data.

There are *lots* of tricks compilers can play that will break a
conservative garbage collector.  Virtual origins is one.  Playing games
with pointer representation is another.  E.g. packing a small integer
field and a pointer into one 32-bit word.  (A pointer doesn't always
need all 32 bits -- the low bits are always zero, because the thing is
known to be aligned, and the high bits are known, because the compiler
knows where the heap and other data is in the address space).  How about
the Lisp-ish tricks for representing fixnums vs. bignums?

Compiler writers blame it on the conservative gc, and gc writers blame
it on the compiler.  ;-)  Either way, there has to be *some* known
information about the interface between the two, or gc won't work.

- Bob




  reply	other threads:[~1996-09-18  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-17  0:00 Great Circle and Ada? Lars Farm
1996-09-17  0:00 ` Robert A Duff
1996-09-17  0:00   ` Norman H. Cohen
1996-09-18  0:00     ` Robert A Duff [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-09-14  0:00 John G. Volan
1996-09-15  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