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-24 02:37:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!193.216.69.35.MISMATCH!dax.net!juliett.dax.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Garbage collector on Ada? References: <3D1316EE.5570AB2A@nbi.dk> <3D132D6C.5050908@ib-paus.com> <3D139BD7.6050504@attbi.com> From: Ole-Hjalmar Kristensen Message-ID: <7vk7op3tnj.fsf@vlinux.voxelvision.no> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 24 Jun 2002 09:36:33 GMT NNTP-Posting-Host: 193.216.12.150 X-Complaints-To: abuse@tele2.no X-Trace: juliett.dax.net 1024911393 193.216.12.150 (Mon, 24 Jun 2002 11:36:33 MET DST) NNTP-Posting-Date: Mon, 24 Jun 2002 11:36:33 MET DST Organization: Tele2 Norway AS Public Access Xref: archiver1.google.com comp.lang.ada:26642 Date: 2002-06-24T09:36:33+00:00 List-Id: "Robert I. Eachus" writes: > 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. Neither do I for Ada compilers. But Modula-3 has (had?) exactly that, you can choose garbage collection or not, depending on the pool.