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.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:1671:: with SMTP id d17mr4396601qko.191.1631616893248; Tue, 14 Sep 2021 03:54:53 -0700 (PDT) X-Received: by 2002:a25:d497:: with SMTP id m145mr21849123ybf.389.1631616893032; Tue, 14 Sep 2021 03:54:53 -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: Tue, 14 Sep 2021 03:54:52 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=89.8.134.225; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 89.8.134.225 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6db89043-7d5b-4856-b4e5-093219685b9bn@googlegroups.com> Subject: Re: Custom Storage Pool questions From: Egil H H Injection-Date: Tue, 14 Sep 2021 10:54:53 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62736 List-Id: On Tuesday, September 14, 2021 at 2:48:16 AM UTC+2, Jere wrote: > > Yes, but if you look at that blog, they are allocating space for the /user/ data > and for the Next/Prev for controlled types and First/Last for unconstrained > arrays in addition to the size specified by allocate. > Yes, but if you look at that blog, they explain the default layout of fat pointers, and the special value that need to be set on access types for the layout to change. If you use such a GNAT-ism, your storage pool will also be bound to GNAT... ie: "GNAT typically uses a "fat pointer" for this purpose: the access itself is in fact a record of two pointers, one of which points to the bounds, the other points to the data. This representation is not appropriate in the case of the header storage pool, so we need to change the memory layout here." and: "we need to ensure that the bounds for unconstrained arrays are stored next to the element, not in a separate memory block, to improve performance. This is done by setting the Size attribute on the type. When we set this size to that of a standard pointer, GNAT automatically changes the layout," -- ~egilhh