From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Memory management clarification
Date: 26 Jul 2005 10:21:18 -0400
Date: 2005-07-26T10:21:18-04:00 [thread overview]
Message-ID: <wccu0ihzm01.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: VirFe.4693$3p2.511@trndny04
"Frank J. Lhota" <NOSPAM.lhota@adarose.com> writes:
> Maciej Sobczak wrote:
> > Hi,
> > Trying to learn a bit of Ada I came across a statement that memory
> > allocated from the pool will be implicitly reclaimed when the acces
> > variable used to reference it goes out of scope.
>
> No, that is not true. What is true is that if an access type goes out of
> scope, then the data allocated from the pool for that type will be
> reclaimed. See ARM 13.11 (18).
That's not quite true, either. Most implementations use a global heap
by default, and never automatically reclaim memory. If you use a
Storage_Size clause on a local access type, then what you say is true.
But local access types are not very useful.
> Most Ada implementations do not support garbage collection, and with
> such implementations, your examples would simply create a lot of garbage.
Right.
- Bob
next prev parent reply other threads:[~2005-07-26 14:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-26 9:57 Memory management clarification Maciej Sobczak
2005-07-26 10:38 ` Adrien Plisson
2005-07-26 14:19 ` Robert A Duff
2005-07-26 13:57 ` Frank J. Lhota
2005-07-26 14:21 ` Robert A Duff [this message]
2005-07-26 18:11 ` Frank J. Lhota
2005-07-26 14:17 ` Robert A Duff
2005-07-26 15:39 ` Maciej Sobczak
2005-07-26 17:45 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox