From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1f2b6675d1185b30 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-21 14:32:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!wn1feed!wn2feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3D139BD7.6050504@attbi.com> From: "Robert I. Eachus" Organization: Eachus Associates User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2 X-Accept-Language: en,pdf MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Garbage collector on Ada? References: <3D1316EE.5570AB2A@nbi.dk> <3D132D6C.5050908@ib-paus.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.61.239.24 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52.ops.asp.att.net 1024695164 24.61.239.24 (Fri, 21 Jun 2002 21:32:44 GMT) NNTP-Posting-Date: Fri, 21 Jun 2002 21:32:44 GMT Date: Fri, 21 Jun 2002 21:32:44 GMT Xref: archiver1.google.com comp.lang.ada:26578 Date: 2002-06-21T21:32:44+00:00 List-Id: 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.