comp.lang.ada
 help / color / mirror / Atom feed
From: ncohen@watson.ibm.com (Norman H. Cohen)
Subject: Re: Does memory leak?
Date: 1995/04/06
Date: 1995-04-06T00:00:00+00:00	[thread overview]
Message-ID: <3m0r01$174b@watnews1.watson.ibm.com> (raw)
In-Reply-To: D6KtAI.JyG@inmet.camb.inmet.com

In article <D6KtAI.JyG@inmet.camb.inmet.com>, stt@spock.camb.inmet.com
(Tucker Taft) writes: 

|> John Baker (jbaker@thor.tu.hac.com) wrote: 
|>
|> : The Lisp i programmed in (symbolics) had a really nice feature --
|> : allocation to *named* areas of memory.  You could allocate
|> : objects with differing life spans in different areas and then
|> : (at the appropriate time), wipe a whole named area and start over
|> : without having to destroy the objects individually.  Very fast
|> : and easy to control.  I'd like to see a feature like that in C++
|> : and ADA.
|>
|> This is essentially equivalent to "mark/release."

No, mark/release is for FIFO deallocation.  What John has described
allows a compiler writer, for example, to allocate data structures that
will persist over all phases of the compiler (for example aliasing
information computed by the front end and used during optimization) in
one area, and to allocate data structures that are only needed during the
first pass (for example a symbol table for nonexternal symbols) in
another area, INTERLEAVING ALLOCATIONS IN THE TWO AREAS, and then to
destroy the second area in its entirety after the first pass, leaving the
first area intact.  Mark/release would not allow the interleaving.

|>                                                    This is supported
|> in Ada 95 via user-defined storage pools.  There is an example in the
|> Ada 95 Rationale on this (see section on "Storage Pool Management").

Ada 95 does indeed solve the problem, but it is the ability to explicitly
associate different storage pools with different access types (and the
ability to control when a storage-pool object is finalized) that solves
the problem, not the addition of Mark and Release operations.

Allocation in areas (which could themselves be allocated and deallocated)
was a very useful feature of PL/I, and I'm glad to see it is not
forgotten.

--
Norman H. Cohen    ncohen@watson.ibm.com




  reply	other threads:[~1995-04-06  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         ` Theodore Dennison
1995-03-30  0:00         ` Robb Nebbe
1995-03-30  0:00       ` Henry Baker
1995-04-04  0:00         ` John Baker
1995-04-05  0:00           ` Tucker Taft
1995-04-06  0:00             ` Norman H. Cohen [this message]
1995-04-07  0:00               ` Tucker Taft
1995-04-05  0:00           ` Pat Rogers
1995-04-05  0:00           ` Sverre Brubaek
1995-04-05  0:00           ` Ray Toal
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
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