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/19
Date: 1998-04-19T00:00:00+00:00	[thread overview]
Message-ID: <dewar.893038515@merv> (raw)
In-Reply-To: ErooFF.IFM@sd.aonix.com


Ed says

<<ObjectAda for Windows and UNIX are compatible with Geodesic Systems' Great
Circle gc.
>>

I assume this is a conservative garbage collector. This is not the same as
true GC, but is often quite effective. I would guess most Ada compilers would
be compatible with a number of packages of this type. Basically any compiler
that uses malloc and free in a conventional manner wlil be compatible (the
use of certain techniques like virtual origins can mess things up). People
have used a number of different conservative collectors with GNAT successfully.

THe conservative collectors work by not compacting memory, and by holding onto
memory if any pointer *might* (rather than does) reference a block (e.g. if
an integer value just happens to match the address of a block, then the block may be
preserved.

True garbage collection has to be effectively integrated into the compiler,
since it must know the data types of everything. This is quite tricky in the
presence of variant records and class wide types.

It would be a nice project to try to add true GC to GNAT, but no one has
tried this yet that I am aware of. It is not impossi ble to do (the GCC
Modula 3 compiler has true GC).





  reply	other threads:[~1998-04-19  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 [this message]
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
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