From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:622a:202:: with SMTP id b2mr4398631qtx.158.1632097886622; Sun, 19 Sep 2021 17:31:26 -0700 (PDT) X-Received: by 2002:a25:4789:: with SMTP id u131mr28242568yba.531.1632097886496; Sun, 19 Sep 2021 17:31:26 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 19 Sep 2021 17:31:26 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=98.118.241.166; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 98.118.241.166 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9bc55d72-b90e-45c5-bfd8-cbce565d139dn@googlegroups.com> Subject: Re: Custom Storage Pool questions From: Jere Injection-Date: Mon, 20 Sep 2021 00:31:26 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62780 List-Id: Followup question cause Randy's statement (below) got me thinking: If a compiler is allowed to break up an allocation into multiple calls to Allocate (and of course Deallocate), how does one go about enforcing that the user's header is only created once? In the example Randy gave (unconstrained arrays), in Janus there is an allocation for the descriptor and a separate allocation for the data. If I am making a storage pool that is intending to create a hidden header for my objects, this means in Janus Ada (and potentially other compilers) I would instead create two headers, one for the descriptor and one for the data, when I might intend to have one header for the entire object. On Monday, September 13, 2021 at 1:29:39 AM UTC-4, Randy Brukardt wrote: > Not sure what you are expecting. There is no requirement that objects are > allocated contigiously. Indeed, Janus/Ada will call Allocate as many times > as needed for each object; for instance, unconstrained arrays are in two > parts (descriptor and data area). > > > > Randy. > > > "Jere" <> wrote in message > news:e3c5c553-4a7f-408a...@googlegroups.com... > >I was learning about making user defined storage pools when > > I came across an article that made me pause and wonder how > > portable storage pools actually can be. In particular, I assumed > > that the Size_In_Storage_Elements parameter in the Allocate > > operation actually indicated the total number of storage elements > > needed. > > > > > >