comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: Garbage collector on Ada?
Date: Fri, 21 Jun 2002 21:32:44 GMT
Date: 2002-06-21T21:32:44+00:00	[thread overview]
Message-ID: <3D139BD7.6050504@attbi.com> (raw)
In-Reply-To: 3D132D6C.5050908@ib-paus.com


Dr. Michael Paus wrote:

> Just for curiosity. Has there ever been an Ada implementation besides 
> JGNAT which uses a garbage collector?
 

Yes, Symbolics had an Ada 83 compiler with garbage collection.


Pedro Menendez wrote:

 
> Since the standard specifically allows garbage collectors,
> it would be very strange if it was impossible to implement.
> But it definitely appears to be atypical.


Actually, the reason that most Ada compilers don't have general garbage 
collectors is that most of Ada is designed to avoid distributed costs. 
For example, if you use Ada.Strings.Unbounded, the standard requires 
that the type not leave uncollected garbage. The typical implementation 
is to use a protocol that either explicitly does reference counting or 
does copying on assignment.  That way you only pay a small, fixed cost 
if and when you use Ada.Strings.Unbounded.

Similarly most packages that create either many objects on the heap or 
large objects on the heap tend to take out their own garbage.  It would 
be nice to have a general purpose garbage collector available as a 
storage pool, such that any objects in the pool would be subject to 
garbage collection.  But I don't know of such an implementation.




  reply	other threads:[~2002-06-21 21:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-21 10:41 Garbage collector on Ada? Pedro Menendez
2002-06-21 12:07 ` Jacob Sparre Andersen
2002-06-21 13:43   ` Dr. Michael Paus
2002-06-21 21:32     ` Robert I. Eachus [this message]
2002-06-24  9:36       ` Ole-Hjalmar Kristensen
2002-06-22 10:37     ` Pedro Menendez
2002-06-22 11:29       ` Jacob Sparre Andersen
2002-06-21 14:35 ` Wes Groleau
2002-06-21 15:05   ` tgingold
2002-06-21 15:29     ` Wes Groleau
2002-06-21 15:32 ` Darren New
2002-06-21 15:46   ` Ole-Hjalmar Kristensen
replies disabled

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