From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Finding out minimal allocation unit
Date: Sat, 07 Apr 2007 11:27:29 +0200
Date: 2007-04-07T11:27:29+02:00 [thread overview]
Message-ID: <1197830.UlmGAzoze6@linux1.krischik.com> (raw)
In-Reply-To: 4ecee38d97sbellon@sbellon.de
Stefan Bellon wrote:
> Martin Krischik wrote:
>
>> First we need to know which platform you are using (compiler/OS).
>
> GNAT on GNU/Linux, Windows and Solaris, where the memory allocation
> should work well on all three of them (but using separates or package
> Naming in a project file to supply different algorithms for the
> allocation strategy is no problem).
The GNAT default storrage pool just calls malloc and free from the C
libraries - which explains the overhead.
>> Then: how a storrage pool get's it memory is up to the pool designer.
>
>> In your case you could allocate a large chuck of memory strait from
>> the OS and then sub-allocate it using an algorithm optimised for your
>> needs.
>
> When using storage pools, can the storage pools be dynamically resized,
> or is a storage pool, once created, fixed in its size? The latter would
> rule out using storage pools since we do not know in advance how many
> data we need to store, just the "Item_Type" is known when instantiating
> the data structure, so it's size is known (provided we can trust the
> 'Size, 'Object_Size, and 'Component_Size attributes).
Whatever you implement. Other posters allready suggested a linked list of
arrays which seems the best approach for a variable amount of fixed sized
elements.
Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
next prev parent reply other threads:[~2007-04-07 9:27 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 [this message]
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
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