comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: How do I get this to work??
Date: 1999/01/18
Date: 1999-01-18T00:00:00+00:00	[thread overview]
Message-ID: <F5rJF8.8sB.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 77vi4q$o7l$1@nnrp1.dejanews.com

robert_dewar@my-dejanews.com wrote:

: In article <sYyo2.8309$Kg6.62453@news2.telusplanet.net>,
:   warwicks@telusplanet.net (Chris Warwick) wrote:

: > Of all the Ada compilers I have dealt with, both 83 and
: > 95, none deallocate memory to my knowledge (GNAT may, but
: > I haven't had need to look). Indeed this is one of the
: > first questions I ask when I discover c++ programmers
: > using Ada...

: You need to cite chapter and verse here. I have worked with
: many many Ada compilers, and none of them ignored unchecked
: deallocation, and it is hard to imagine that any would.
: Of course GNAT deallocates memory, but I would never claim
: this is a special advantage of GNAT, since all Ada
: compilers deallocate memory.

: The only instance I know of in commercial Ada compilers
: which might give rise to such a peculiar claim is the
: old obsolete Alsys 386 compiler, which for local
: collections (not very common in practice) delayed the
: deallocation till scope exit, but even there to say that
: the memory was not deallocated is false.

: Just what *are* you talking about here. I have often heard
: misinformation about Ada spread, but this is among the
: most extraordinary examples!

I can imagine that perhaps Chris Warwick meant that 
Unchecked_Deallocation recycles storage for use by later 
allocators, but never returns it to the operating system.
This does not surprise me, because the total memory required
by a program, even with perfect reclamation, rarely
goes down over time, so giving memory back to the operating
system temporarily seems like an expensive thing to do for 
little potential payoff.  

Chris, is that what you meant?  If so, I am curious
what sort of application system requires this behavior.

For what it is worth, there are a number of Ada 95 compilers
(e.g. on VxWorks and Windows NT) which directly connect to the 
underlying operating system malloc/free when the user uses 
allocators/unchecked-deallocation.  I suppose these "operating 
system" malloc/frees might recycle storage to other concurrently 
running processes, though I don't know for sure.

--
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  reply	other threads:[~1999-01-18  0:00 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-04  0:00 How do I get this to work?? Chris Warwick
1999-01-05  0:00 ` Tom Moran
1999-01-05  0:00 ` Chris Warwick
1999-01-05  0:00   ` Stephen Leake
1999-01-05  0:00     ` Tom Moran
1999-01-06  0:00       ` robert_dewar
1999-01-06  0:00         ` Tom Moran
1999-01-07  0:00           ` robert_dewar
1999-01-07  0:00             ` Tom Moran
1999-01-10  0:00               ` robert_dewar
1999-01-06  0:00         ` Tom Moran
1999-01-07  0:00           ` robert_dewar
1999-01-07  0:00             ` Tom Moran
1999-01-10  0:00               ` robert_dewar
1999-01-10  0:00                 ` Tom Moran
1999-01-10  0:00                   ` robert_dewar
1999-01-10  0:00                     ` Pat Rogers
1999-01-10  0:00                     ` Tom Moran
1999-01-10  0:00                   ` robert_dewar
1999-01-06  0:00         ` Larry Kilgallen
1999-01-06  0:00           ` Tom Moran
1999-01-06  0:00     ` Chris Warwick
1999-01-06  0:00       ` Tom Moran
1999-01-07  0:00       ` robert_dewar
1999-01-09  0:00         ` Chris Warwick
1999-01-09  0:00           ` Brian Rogoff
1999-01-10  0:00             ` Matthew Heaney
1999-01-09  0:00           ` Simon Wright
1999-01-10  0:00             ` robert_dewar
1999-01-11  0:00               ` Simon Wright
1999-01-16  0:00               ` Chris Warwick
1999-01-16  0:00                 ` robert_dewar
1999-01-18  0:00                   ` Chris Warwick
1999-01-18  0:00                     ` Matthew Heaney
1999-01-16  0:00                 ` Simon Wright
1999-01-16  0:00                 ` Matthew Heaney
1999-01-16  0:00                   ` robert_dewar
1999-01-18  0:00                   ` Chris Warwick
1999-01-18  0:00                     ` Matthew Heaney
1999-01-18  0:00                     ` robert_dewar
1999-01-18  0:00                       ` Tucker Taft [this message]
1999-01-19  0:00                         ` Chris Warwick
1999-01-19  0:00                           ` Tom Moran
1999-01-19  0:00                           ` Stephen Leake
1999-01-19  0:00                           ` robert_dewar
1999-01-20  0:00                             ` Jeff Carter
1999-01-20  0:00                               ` robert_dewar
1999-01-21  0:00                                 ` Chris Warwick
1999-01-18  0:00                       ` dennison
1999-01-18  0:00                     ` dennison
1999-01-07  0:00       ` Stephen Leake
1999-01-08  0:00         ` Simon Wright
1999-01-06  0:00     ` robert_dewar
1999-01-06  0:00   ` Simon Wright
1999-01-22  0:00   ` Nick Roberts
replies disabled

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