From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,427e29f23a651ddb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Stefan Bellon Newsgroups: comp.lang.ada Subject: Re: Finding out minimal allocation unit Date: Thu, 05 Apr 2007 08:12:26 +0200 Organization: University of Stuttgart Message-ID: <4ecea2f308sbellon@sbellon.de> References: <20070403144350.6c95e085@cube.tz.axivion.com> <1175606570.4684.11.camel@localhost> <461257ea$1@news.post.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 1175753548 00 26542 4f0B6kjrONQBa9d 070405 06:12:28 X-Complaints-To: usenet-abuse@t-online.de X-ID: Z791UEZFwesXJ7QoKgUvBeCB+SIilpzdloEVSRpSRc+1tFzbfzyD0z User-Agent: Pluto/3.04c (RISC-OS/5.11) NewsHound/v1.50-32 X-Request-PGP: http://www.sbellon.de/gpg.asc X-PGP-ID: 05360CB9 / 55DB 48FE BA59 7BA0 2B9D 4822 38C5 EC21 0536 0CB9 X-URL: http://www.sbellon.de/ Xref: g2news1.google.com comp.lang.ada:14790 Date: 2007-04-05T08:12:26+02:00 List-Id: Randy Brukardt wrote: > But that isn't really a meaningful question. It clearly depends on > the storage pool, and if the storage pool comes from somewhere else, > it may even depend on the OS version you are running. For instance, > the standard storage pool in Janus/Ada uses a standard Windows heap. > Those exhibit vastly different behavior on Windows 95 than Windows > 2000, and somewhat different on almost every version of Windows. I don't agree that it isn't a meaningful question because of that. Quite the contrary. _Because_ we realize that there are differences, we'd like to find out the allocation strategy in order to optimize for that. > Rule of thumb: if the behavior of the standard storage pool actually > makes a difference in your application, then don't use it! Ok, this is an alternative to think about. > Write your own storage pool that has the behavior you need. It's > relatively easy to do, especially if you have fixed size elements. > And then you can effectively use an array to allocate elements and > still have cheap insertion and deletion and reordering. I'm a bit unclear about how to do it. Do I implement the Allocate using the standard storage pool (i.e. using 'new') or do I interface it directly to the underlying C library (i.e. using 'malloc')? In both cases I still have the same problem as above. Are there examples of such a storage pool implementation around? -- Stefan Bellon