From: s424@ii.uib.no (Sverre Brubaek)
Subject: Re: Does memory leak?
Date: 1995/04/05
Date: 1995-04-05T00:00:00+00:00 [thread overview]
Message-ID: <3ltkch$8vl@alf.uib.no> (raw)
In-Reply-To: 3ls2ku$qls@hacgate2.hac.com
In article <3ls2ku$qls@hacgate2.hac.com>, jbaker@thor.tu.hac.com (John Baker) writes:
|> Henry Baker (hbaker@netcom.com) wrote:
|> : In article <3l6gf6$h05@theopolis.orl.mmc.com>, Theodore Dennison
|> : <dennison@escmail.orl.mmc.com> wrote:
|>
|> : > Perhaps I'm missing something here...what exactly is wrong with using
|> : > UNCHECKED_DEALLOCATION?
|> : >
|> : > I mean, if you don't deallocate what you allocate, your program will
|> : > leak memory no matter what language it is written in. This isn't an Ada
|> : > issue, it's an issue of sloppy coding.
|>
|> : Not necessarily true. I've written lots and lots of Lisp programs, and
|> : I think that I forgot to deallocate in almost all of them. They worked
|> : just fine.
|>
|> : (Of course I'm being facetious. Lisp doesn't have a deallocate primitive,
|> : because it has an automatic garbage collector, just like Modula and Eiffel.
|> : Furthermore, garbage collection can't collect stuff that is still linked
|> : to live objects, so you can still get a 'leak' this way.)
|>
|> 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.
|>
|> JB
I'll just quote from the RM:
13.11 Storage Management
(1)
Each access-to-object type has an associated storage pool. The storage
allocated by an allocator comes from the pool; instances of
Unchecked_Deallocation return storage to the pool. Several access types
can share the same pool.
(2)
A storage pool is a variable of a type in the class rooted at
Root_Storage_Pool, which is an abstract limited controlled type. By
default, the implementation chooses a standard storage pool for each
access type. The user may define new pool types, and may override the
choice of pool for an access type by specifying Storage_Pool for the type.
I'd say this looks pretty much like the feature you wanted.
P.S. Although it has been said before, Ada is _not_ spelled in capitals.
--
+-------------------------------Sverre Brubaek--------------------------------+
| e-mail s424@brems.ii.uib.no | s-mail Stoeletorget 10, 5003 bergen |
| v-mail (+47) 55 96 24 81 | www http://brems.ii.uib.no/~s424/ |
+-------------------------------------+---------------------------------------+
- --** Team os/2 **-- - - - --** Team Ada **-- - - - --** MNIF-stud **-- -
next prev parent reply other threads:[~1995-04-05 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 ` Pat Rogers
1995-04-05 0:00 ` Sverre Brubaek [this message]
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
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