comp.lang.ada
 help / color / mirror / Atom feed
From: macrakis@HARVARD.HARVARD.EDU (Stavros Macrakis)
Subject: GC in Ada
Date: Wed, 2-Apr-86 12:50:53 EST	[thread overview]
Date: Wed Apr  2 12:50:53 1986
Message-ID: <8604030751.AA09547@ucbvax.berkeley.edu> (raw)

`Garbage collection' (GC) has been used in more than one sense in
this discussion.  Several contributors equate GC with `storage
reclamation'.  This is misleading.  The essence of GC is finding free
space by determining what access objects remain in use.

GC is a particular type of automatic storage reclamation -- reference
counting, e.g., is another.  And explicit deallocation or deallocation
of stack frames at scope exit time is simply not automatic storage
reclamation.  Neither is deallocating an entire collection at the exit
of the scope declaring the type.  All of these are useful techniques,
but they are not GC.  GC has different advantages and disadvantages
than each of these other methods.

It is not possible to write a garbage collector within Ada (unless, of
course, you have hooks into the implementation).  It is not even
possible to define a private type which reclaims its own space within
Ada.  The essential problem is that there is no way of determining the
``immediately accessible nodes'' in Knuth's ("Art") terminology, i.e.
the variables containing access values.  It would be possible to
define a limited type that used GC or ref counting if there were a
finalization operation (see Schwarz&Melliar-Smith, ``The Finalization
Operation for Abstract Types'' ICSE/5, p273).

For a discussion of issues relating to GC implementation in an
Ada-like environment, see Susan Owicki, ``Making the World Safe for
GC'' in POPL/8, p77.

The term `Garbage collection' has had a precise meaning for over
twenty years.  Here are some citations:

J.McCarthy et al, "Lisp 1.5 Programmer's Manual" (2nd ed, 1965) p105:
   garbage collector: The routine in LISP which identifies all active
   list structure by tracing it from fixed base cells and marking it,
   and then collects all unneeded cells (garbage) into a free-storage
   list so that these words can be used again.

Knuth, "Art" (1st ed, 1968), sec 2.5B p438:
   ...a policy of simply doing nothing until space runs out, then
   searching for all the areas currently in use and fashioning a
   new AVAIL list.

Aho&Ullman, "Principles of Compiler Design" (1st ed, 1977) p44:
   A garbage collection scans all records, determining which are in
   use, and making an <available space list> of those which may be
   reused.

Note that "garbage collection" has been used in many systems other than
Lisp with the same meaning: Snobol, ECL, MIT Teco (!), ....

	-s


ICSE = Intl. Conf. on Software Engineering
POPL = Principles of Programming Languages (Conf.)

             reply	other threads:[~1986-04-02 17:50 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-04-02 17:50 Stavros Macrakis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-01-24 11:06 How come Ada isn't more popular? gautier_niouzes
2007-01-24 19:25 ` tmoran
2007-01-25  4:46   ` Gautier
2007-01-25  9:29     ` Markus E Leypold
2007-01-27 16:59       ` Stephen Leake
2007-01-27 20:40         ` Markus E Leypold
2007-01-29  8:56           ` Maciej Sobczak
2007-01-29 14:21             ` Markus E Leypold
2007-01-31  9:23               ` Maciej Sobczak
2007-01-31 10:24                 ` Markus E Leypold
2007-02-02  8:42                   ` Maciej Sobczak
2007-02-02 13:57                     ` Markus E Leypold
2007-02-05  9:59                       ` Maciej Sobczak
2007-02-05 13:43                         ` Markus E Leypold
2007-02-06  9:15                           ` Maciej Sobczak
2007-02-06 11:45                             ` Markus E Leypold
2007-02-06 14:16                               ` Maciej Sobczak
2007-02-06 15:44                                 ` Markus E Leypold
2007-02-07  8:55                                   ` Maciej Sobczak
2007-02-07  9:30                                     ` GC in Ada Martin Krischik
2007-02-07 11:08                                       ` Markus E Leypold
2007-02-07 11:15                                       ` Maciej Sobczak
2007-02-07 11:53                                         ` Martin Krischik
2007-02-07 12:22                                           ` Markus E Leypold
2007-02-08  7:26                                             ` Martin Krischik
2007-02-08  9:33                                               ` Markus E Leypold
2007-02-09 13:37                                                 ` Martin Krischik
2007-02-09 13:47                                                 ` Georg Bauhaus
2007-02-09 15:29                                                   ` Maciej Sobczak
2007-02-09 20:52                                                     ` Georg Bauhaus
2007-02-08  7:48                                           ` Maciej Sobczak
2007-02-08  8:20                                             ` Martin Krischik
2007-02-08  8:43                                             ` Markus E Leypold
2007-02-09 14:20                                               ` Maciej Sobczak
2007-02-09 16:23                                                 ` Markus E Leypold
2007-02-12  8:52                                                   ` Maciej Sobczak
2007-02-12 12:56                                                     ` Markus E Leypold
2007-02-08 18:24                                             ` Jeffrey R. Carter
2007-02-09  8:57                                               ` Jean-Pierre Rosen
2007-02-09 12:57                                                 ` Robert A Duff
2007-02-09 14:44                                                   ` Jean-Pierre Rosen
2007-02-10 13:38                                                     ` Robert A Duff
2007-02-12  8:47                                                       ` Jean-Pierre Rosen
2007-02-12 15:31                                                         ` Jeffrey R. Carter
2007-02-09 18:35                                                 ` Jeffrey R. Carter
2007-02-10 19:01                                                   ` Martin Krischik
2007-02-11 15:22                                                   ` Pascal Obry
2007-02-11 20:30                                                     ` Jeffrey R. Carter
2007-02-13 18:47                                                       ` Pascal Obry
2007-02-13 23:08                                                         ` Jeffrey R. Carter
2007-02-14 11:13                                                           ` Jean-Pierre Rosen
2007-02-14 16:29                                                             ` Jeffrey R. Carter
2007-02-14 19:47                                                           ` Robert A Duff
2007-02-14 11:10                                                         ` Jean-Pierre Rosen
2007-02-14 16:29                                                           ` Jeffrey R. Carter
2007-02-15  8:39                                                             ` Jean-Pierre Rosen
2007-02-15 17:14                                                               ` Jeffrey R. Carter
2007-02-08 18:38                                           ` Dmitry A. Kazakov
2007-02-09  7:58                                             ` Maciej Sobczak
2007-02-09 10:07                                             ` Martin Krischik
2007-02-09 14:10                                               ` Dmitry A. Kazakov
2007-02-07 12:19                                         ` Markus E Leypold
2007-02-08  7:54                                           ` Maciej Sobczak
2007-02-08  9:49                                             ` Markus E Leypold
1986-04-04  3:41 Rick Conn
1986-04-02  3:02 Rick Conn
1986-04-01 22:00 Stavros Macrakis
replies disabled

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