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!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!164.128.36.58!news.ip-plus.net!newsfeed.ip-plus.net!news.post.ch!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Finding out minimal allocation unit Date: Tue, 03 Apr 2007 15:34:33 +0200 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <461257ea$1@news.post.ch> References: <20070403144350.6c95e085@cube.tz.axivion.com> <1175606570.4684.11.camel@localhost> NNTP-Posting-Host: 194.41.146.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: atlas.ip-plus.net 1175607279 12290 194.41.146.1 (3 Apr 2007 13:34:39 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Tue, 3 Apr 2007 13:34:39 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: <1175606570.4684.11.camel@localhost> X-Original-NNTP-Posting-Host: w01iwt.pnet.ch X-Original-Trace: 3 Apr 2007 15:34:34 +0200, w01iwt.pnet.ch Xref: g2news1.google.com comp.lang.ada:14763 Date: 2007-04-03T15:34:33+02:00 List-Id: Georg Bauhaus schrieb: > On Tue, 2007-04-03 at 14:43 +0200, Stefan Bellon wrote: > >> Is there a reliable way of finding out the smallest allocation unit? > > FWIW, > > type LP is -- new ... with > record > forward: access LP; > backward: access LP; > end record; > for LP'Size use 63; > > should make the compiler complain when 63 bits aren't enough. > I think you misunderstood the OP: if you use new to create an object inside an storage pool then additional housekeeping informations are added to object. Also if the storage pool uses C malloc (as GNAT does) then the object need to universally aligned. C - unlike Ada - demands that the pointer returned need to suitable for all kind of data. So I believe the OP wanted to know how to find out how much memory for "new"ed object is allocated in total in order to know if extra optimisation is needed. Martin