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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aa67891ee705f5f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-21 11:34:56 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newspeer.radix.net!uunet!ash.uu.net!world!news From: Robert A Duff Subject: Re: Q: Creating my own storage pools User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Tue, 21 Jan 2003 19:33:49 GMT Content-Type: text/plain; charset=us-ascii References: <3e2cc50a$0$33931$bed64819@news.gradwell.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:33315 Date: 2003-01-21T19:33:49+00:00 List-Id: porton@ex-code.com (Victor Porton) writes: > 13.11.20. "The effect of calling Allocate and Deallocate for a standard > storage pool directly (rather than implicitly via an allocator or an > instance of Unchecked_Deallocation) is unspecified." > > I want to use the standard storage pool for allocating memory for my > own portable storage pool. But how to allocate from the standard pool > the given number of storage elements? Use "new" on a type with no "for T'Storage_Pool use...". >... Should I use packed arrays? I don't think packing has anything to do with it. > Also how to deal with alignment of the allocated memory? Say "for T'Alignment use ..." on the type that is being new-ed. This is probably an array of bytes or array of words or some such thing, and your pool is allocating individual pieces of those chunks. - Bob