comp.lang.ada
 help / color / mirror / Atom feed
From: hbaker@netcom.com (Henry Baker)
Subject: Re: Does memory leak?
Date: 1995/03/26
Date: 1995-03-26T00:00:00+00:00	[thread overview]
Message-ID: <hbaker-2603951507040001@192.0.2.1> (raw)
In-Reply-To: 1995Mar24.123006.9471@eisner

In article <1995Mar24.123006.9471@eisner>, kilgallen@eisner.decus.org
(Larry Kilgallen, LJK Software) wrote:

> In article <hbaker-2303951759400001@192.0.2.1>, hbaker@netcom.com (Henry
Baker) writes:
> 
> > Most serious Ada compilers try pretty hard not to leak from internal leaks. 
> > However, objects that you allocate yourself with 'new' are considered your
> > problem.  Huge amounts of network, conference and newsletter bandwidth
have been
> > wasted on trying to get around the fact that Ada doesn't provide a built-in
> > solution to this problem.
> 
> From the Ada83 manual "An implementation may (but need not) reclaim the
> storage occupied by an object created by an allocator, once this object
> has become inaccessible."
> 
> The next section describes the CONTROLLED pragma to forbid implementations
> from reclaiming memory except when leaving the innermost "block statement,
> subprogram body or task body" enclosing the type declaration.
> 
> Is the complaint that Ada should force implementors to reclaim storage,
> or that when the CONTROLLED pragma is not used, implementations should
> take a less conservative approach than waiting to exit the scope of the
> type declaration?

Ada83 took a 'see no evil, hear no evil,...' approach to storage management.
Therefore, some of the vendors initially took the same (sloppy) attitude --
e.g., Rational, Telesoft, etc.

It actually takes a great deal of sophistication for a language to offer
automatic, safe, flexible, customizable memory management protocols -- this is
probably why NO language today offers such a collection of features.

From the Ada rationale and the design of Ada, it was clear that automatic
garbage collection was preferred and intended, but never implemented due
to a veto from the intended embedded user community.  Unfortunately,
this left Ada in a never-never land where it didn't have _either_ automatic
storage management _or_ not-so-automatic storage management.

This general lack of 'fit and finish' in Ada83 seems more appropriate for
consumer products from the old Soviet Union than one from the U.S.A.  Given the
nature of the process which produced Ada83, perhaps there is a lesson here??

-- 
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html




  reply	other threads:[~1995-03-26  0:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-22  9:06 Does memory leak? Duncan Sands
1995-03-22 12:04 ` Fred J. McCall
1995-03-23  0:37 ` Robert I. Eachus
1995-03-23 13:54   ` Arthur Evans Jr
1995-03-23 16:23     ` Robert I. Eachus
1995-03-24 21:08   ` Norman H. Cohen
1995-03-28  0:00     ` Theodore Dennison
1995-03-31  0:00     ` Kent Mitchell
1995-03-23  2:08 ` T. Owen O'Malley
1995-03-24 11:44   ` Robert Dewar
1995-03-27 14:01     ` Theodore Dennison
1995-03-29  0:00       ` John DiCamillo
1995-03-30  0:00         ` Robb Nebbe
1995-03-30  0:00         ` Theodore Dennison
1995-03-30  0:00       ` Henry Baker
1995-04-04  0:00         ` John Baker
1995-04-05  0:00           ` Ray Toal
1995-04-05  0:00           ` Sverre Brubaek
1995-04-05  0:00           ` Pat Rogers
1995-04-05  0:00           ` Tucker Taft
1995-04-06  0:00             ` Norman H. Cohen
1995-04-07  0:00               ` Tucker Taft
1995-03-30  0:00   ` Robert I. Eachus
1995-03-23 22:38 ` Tucker Taft
1995-03-24  1:57 ` Henry Baker
1995-03-24 17:30   ` Larry Kilgallen, LJK Software
1995-03-26  0:00     ` Henry Baker [this message]
1995-03-27 15:19     ` Norman H. Cohen
1995-03-27 14:35   ` Kennel
1995-03-24 12:29 ` Mike Meier
1995-03-24 10:46   ` Fred J. McCall
1995-03-24 15:44   ` David Weller
1995-03-25  1:55   ` kkrieser
  -- strict thread matches above, loose matches on Subject: below --
1995-03-27  9:36 Duncan Sands
replies disabled

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