comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: Finding out minimal allocation unit
Date: Fri, 06 Apr 2007 18:17:27 +0100
Date: 2007-04-06T18:17:27+01:00	[thread overview]
Message-ID: <m2ps6hqv6g.fsf@mac.com> (raw)
In-Reply-To: 4ecf319357sbellon@sbellon.de

Stefan Bellon <sbellon@sbellon.de> writes:

> Well, our idea was to build a generic storage pool which can handle
> only memory chunks of one size. And the generic storage pool is
> instantiated with that size as generic parameter. So that each data
> structure instance (be it a list, a tree, hash table, ...) has its
> own storage pool with the exact Item_Type'Size instantiated.

I have a feeling that generics were problematic when I tried something
like this -- but you can always use a constraint:

   with System.Storage_Pools;
   with System.Storage_Elements;

   package BC.Support.Managed_Storage is

      pragma Elaborate_Body;

      package SSE renames System.Storage_Elements;
      package SSP renames System.Storage_Pools;

      type Pool (Chunk_Size : SSE.Storage_Count) is
        new SSP.Root_Storage_Pool with private;

from the Booch Components (this particular pool has a bug filed
against it at the moment, caused by a perceived need to allocate
variously-sized items from within large chunks and the resulting need
to chain the free list through chunks ...)



  reply	other threads:[~2007-04-06 17:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03 12:43 Finding out minimal allocation unit Stefan Bellon
2007-04-03 13:22 ` Georg Bauhaus
2007-04-03 13:28   ` Stefan Bellon
2007-04-03 13:34   ` Martin Krischik
2007-04-03 13:37     ` Stefan Bellon
2007-04-03 15:17       ` Markus E Leypold
2007-04-04 17:16         ` Robert A Duff
2007-04-05  8:55           ` Markus E Leypold
2007-04-05 17:55             ` Stefan Bellon
2007-04-06  1:40               ` Randy Brukardt
2007-04-06  8:06                 ` Stefan Bellon
2007-04-06 11:06                   ` Markus E Leypold
2007-04-03 23:53     ` Randy Brukardt
2007-04-05  6:12       ` Stefan Bellon
2007-04-05  7:35         ` Martin Krischik
2007-04-05 17:58           ` Stefan Bellon
2007-04-07  9:27             ` Martin Krischik
2007-04-10 21:42             ` Robert A Duff
2007-04-05 13:07         ` Robert A Duff
2007-04-05 18:02           ` Stefan Bellon
2007-04-06  1:31             ` Randy Brukardt
2007-04-06  8:10               ` Stefan Bellon
2007-04-06 17:17                 ` Simon Wright [this message]
2007-04-06 12:38         ` Stephen Leake
2007-04-03 14:12   ` Larry Kilgallen
2007-04-03 13:48 ` Robert A Duff
2007-04-03 16:45 ` 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