comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Allocators and memory reclamation
Date: Mon, 28 Jan 2008 23:46:24 +0100
Date: 2008-01-28T23:46:24+01:00	[thread overview]
Message-ID: <6074a0F1p7g7gU1@mid.individual.net> (raw)
In-Reply-To: fa75962d-8ef0-414a-b0bc-818412e75202@m34g2000hsf.googlegroups.com

gpriv@axonx.com wrote:

> On Jan 28, 9:53 am, Lucretia <lucret...@lycos.co.uk> wrote:
>> On Jan 28, 1:49 pm, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
>>
>> > "By default, the implementation might choose to have a single global
>> > storage pool, which is used (by default) by all access types, which
>> > might mean that storage is reclaimed automatically only upon partition
>> > completion."
>>
>> I didn't realise this either.
>>
>> Luke.
> 
> I think what they mean here is as one allocates memory it will be
> requested on the system level. This memory might be only released when
> all objects are properly deallocated from the entire pool. However it
> seems to be recommendation ("might") and is not what I see with GNAT.
> I see memory footprint growing and shrinking as it runs and it is
> never deallocating all dynamic objects at any time.

GNAT 2007 (at least) ships with two utility storage pools; one which is the
global one and other for local allocations that I guess is closer to the
behavior Maciej expected:

with System.Pool_Local;
declare
   Pool : System.Unbounded_Reclaim_Pool;
   type IA is access integer;
   for IA'Storage_Pool use Pool;
begin
   --  Allocate like crazy;
end;  --  Storage is reclaimed here.



  reply	other threads:[~2008-01-28 22:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 13:49 Allocators and memory reclamation Maciej Sobczak
2008-01-28 14:52 ` gpriv
2008-01-28 14:53 ` Lucretia
2008-01-28 16:00   ` gpriv
2008-01-28 22:46     ` Alex R. Mosteo [this message]
2008-01-28 15:15 ` Dmitry A. Kazakov
2008-01-28 22:27   ` Maciej Sobczak
2008-01-28 23:54     ` Adam Beneschan
2008-01-29  9:38     ` Dmitry A. Kazakov
2008-01-28 23:07   ` Randy Brukardt
2008-01-28 22:00 ` Aurele
2008-01-29  0:41 ` Robert A Duff
2008-01-29 11:12   ` Maciej Sobczak
  -- strict thread matches above, loose matches on Subject: below --
2008-01-29 11:06 Grein, Christoph (Fa. ESG)
2008-01-29 12:50 ` Dmitry A. Kazakov
replies disabled

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