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!news.glorb.com!news.mv.net!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Finding out minimal allocation unit Date: Tue, 03 Apr 2007 09:48:54 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <20070403144350.6c95e085@cube.tz.axivion.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1175608134 20707 192.74.137.71 (3 Apr 2007 13:48:54 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 3 Apr 2007 13:48:54 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:UWsQydzk+c86H7Mhrn3lEm7wRuo= Xref: g2news1.google.com comp.lang.ada:14765 Date: 2007-04-03T09:48:54-04:00 List-Id: Stefan Bellon writes: > Is there a reliable way of finding out the smallest allocation unit? You could print out the addresses of allocated objects, and guess what's going on. If you have access to the source, you could read it. If the underlying allocator is malloc(), there will typically be a couple of words or so of extra space wasted per object, primarily due to design flaws in the C language. If you don't like that, then you can write your own allocator -- look up "storage pools". - Bob