comp.lang.ada
 help / color / mirror / Atom feed
* Does memory leak?
@ 1995-03-22  9:06 Duncan Sands
  1995-03-22 12:04 ` Fred J. McCall
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Duncan Sands @ 1995-03-22  9:06 UTC (permalink / raw)


Does Ada leak memory?  I would like to believe it doesn't, but
how does it manage not to (without having to use unchecked
deallocation)?

For example, if I have a pointer to a block of memory, and I set
that pointer to null, in simple cases I am ready to believe that
the compiler knows I'm finished with the block... but if the
pointer is to a complicated self-referential structure, some sort
of black magic seems needed to work out whether I'm really
finished with that structure or not.  Can this truly be done
efficiently?

You can see that I know nothing about how garbage collection works,
and precious little about what Ada requires for memory management.
I suspect I'm not the only one.  If someone could demystify all this
for me, I would be very grateful...

Thanks a lot,

Duncan Sands.



^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: Does memory leak?
@ 1995-03-27  9:36 Duncan Sands
  0 siblings, 0 replies; 34+ messages in thread
From: Duncan Sands @ 1995-03-27  9:36 UTC (permalink / raw)



Many thanks to everyone who replied to my question "Does
memory leak": Fred J. McCall (fjm@ti.com), Robert I. Eachus
(eachus@spectre.mitre.org), T. Owen O'Malley
(omalley@porte-de-st-ouen.ics.uci.edu), Keith Thompson
(kst@alsys.com), Karl (karl@grebyn.com), Arthur Evans Jr
(evans@evans.pgh.pa.us), Henry Baker (hbaker@netcom.com),
Larry Kilgallen (kilgallen@eisner.decus.org) and everyone
else.

The short answer seems to be: (1) some early compilers were
a bit buggy and leaked, but this is no longer a problem.
(2) if you allocate memory on the free store, you are
responsable for it: some implementations may garbage collect
but not all.

Thanks again,

Duncan Sands.



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~1995-04-07  0:00 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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           ` Pat Rogers
1995-04-05  0:00           ` Sverre Brubaek
1995-04-05  0:00           ` Tucker Taft
1995-04-06  0:00             ` Norman H. Cohen
1995-04-07  0:00               ` Tucker Taft
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

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