From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Ada containers and custom allocators
Date: Wed, 09 Jan 2008 10:29:46 -0500
Date: 2008-01-09T10:29:46-05:00 [thread overview]
Message-ID: <wcchchnc905.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1rny29vw3pipd$.oppchvpo4gnf$.dlg@40tude.net
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> On Tue, 8 Jan 2008 17:54:44 -0600, Randy Brukardt wrote:
>
>> But it isn't valuable enough to force every user
>> of a container to define a storage pool (since there is no name for a
>> standard storage pool).
>
> That always wondered me, why there is no name for. Especially because the
> default storage pool can be obtained anyway:
>
> type Some_Ptr is access Integer; -- Goes to the default storage pool
> package Foo is new Boo (Some_Ptr'Storage_Pool);
The compiler is not required to use the same storage pool for all
types. Therefore, the concept "THE default pool" does not exist.
Some_Ptr'Storage_Pool might be a special pool tuned for the fact that
Size_In_Storage_Elements = 4 and Alignment = 4. Allocate could
add 4 to a known-aligned pointer, and ignore the
Size_In_Storage_Elements and Alignment parameters.
If Boo uses this pool for something other than Integer,
it might not work.
However, I see nothing wrong with having a predefined operation that
returns a suitable pool.
- Bob
next prev parent reply other threads:[~2008-01-09 15:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 15:48 Ada containers and custom allocators Maciej Sobczak
2008-01-07 16:29 ` Dmitry A. Kazakov
2008-01-08 1:54 ` Randy Brukardt
2008-01-08 7:59 ` Maciej Sobczak
2008-01-08 23:54 ` Randy Brukardt
2008-01-09 8:56 ` Dmitry A. Kazakov
2008-01-09 15:29 ` Robert A Duff [this message]
2008-01-09 17:09 ` Dmitry A. Kazakov
2008-01-09 21:58 ` Robert A Duff
2008-01-10 10:12 ` Dmitry A. Kazakov
2008-01-11 5:00 ` Randy Brukardt
2008-01-09 15:28 ` Robert A Duff
2008-01-11 5:00 ` Randy Brukardt
2008-01-11 21:02 ` Maciej Sobczak
2008-01-11 22:41 ` Robert A Duff
2008-01-12 13:40 ` Maciej Sobczak
2008-01-12 15:59 ` Robert A Duff
2008-01-09 1:17 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox