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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ittatc!dcdwest!sdcsvax!ucbvax!harvard.harvard.edu!macrakis From: macrakis@HARVARD.HARVARD.EDU (Stavros Macrakis) Newsgroups: net.lang.ada Subject: GC in Ada Message-ID: <8604012341.AA00699@ucbvax.berkeley.edu> Date: Tue, 1-Apr-86 17:00:09 EST Article-I.D.: ucbvax.8604012341.AA00699 Posted: Tue Apr 1 17:00:09 1986 Date-Received: Sat, 5-Apr-86 08:41:19 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: A few weeks ago, there was a query about garbage collection in Ada. I've assembled a few notes on the subject. Several Ada systems appear to have garbage collectors (GC) in development environments (e.g. Rational, Symbolics). As far as I have been able to ascertain, no production Ada environment provides garbage collection in the target computer. The usual argument is that embedded applications shouldn't GC, because GC is inefficient and episodic. This is spurious for several reasons: 1. Prototypes and early development versions may prefer to sacrifice efficiency for simplicity and speed of programming. 2. Many Ada applications will in fact not be embedded. 3. If you have GC, it is very easy to add a capability to detect and report undeallocated objects and dangling pointers. 4. Embedded applications may even want GC. Traditional episodic GC will do for some; others will need real-time GC algorithms. 5. GC may not be as expensive as is thought, especially if currently known advanced implementation techniques are used. 6. Given Ada's typing, scoping, and tasking, much processing can continue even during episodic GC. However, implementing a GC for Ada is not entirely trivial. Although Ada's semantics certainly allow GC, some compiler-writers may have chosen runtime models which make it impractical or impossible. Not only must pointers in memory be traceable, but transient `hazards' must be avoided. The conditions are even more stringent for relocating/compacting GC, of course. The only current compilers I know the internals of, the Intermetrics Byron Ada compiler family, have their runtime model carefully designed to in fact make GC practical. However, no customer so far has specified GC. I'm sure Intermetrics would be happy to sell a GC option as soon as the market demand became sufficient. -s Stavros Macrakis Harvard Univ. and Intermetrics, Inc.