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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.134.102 with SMTP id i99mr2229603iod.34.1446640792590; Wed, 04 Nov 2015 04:39:52 -0800 (PST) X-Received: by 10.182.112.234 with SMTP id it10mr17561obb.13.1446640792571; Wed, 04 Nov 2015 04:39:52 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!i2no2852321igv.0!news-out.google.com!fs1ni7812igb.0!nntp.google.com!i2no4004902igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 4 Nov 2015 04:39:52 -0800 (PST) In-Reply-To: <1v465ejy695lo$.47114uuwfga6$.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=72.86.45.219; posting-account=vk6_JwoAAABkMyHO1YfdP69Hm3CpbdGR NNTP-Posting-Host: 72.86.45.219 References: <59c99dce-9cc6-4aba-9c5e-a5dd22ef7fea@googlegroups.com> <1v465ejy695lo$.47114uuwfga6$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Questions concerning "Simple Components" From: Jeremiah Injection-Date: Wed, 04 Nov 2015 12:39:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28213 Date: 2015-11-04T04:39:52-08:00 List-Id: On Wednesday, November 4, 2015 at 4:09:56 AM UTC-5, Dmitry A. Kazakov wrote: > > That said, I could be misunderstanding some of the terminology. > > Can anyone add some clarity to what exactly the Width parameter does? > > Width is the number of pairs in the bucket. Depending on the tree > (definite/indefinite) a bucket contains either the pairs as-is or > references to the pairs allocated elsewhere. The persistent B-tree buckets > have the size to fit into one block for optimal I/O. That makes sense. Thank you! > > I really like the concept of Generic_External_B_Tree which use persistent > > storage to save data. One thing I am trying to get a better handle on is > > a better way to handle the Root node address returned from > > Get_Root_Address. I need this value to create the tree in a later > > application invocation. I know I could just save it in another file or > > possibly add a root address value to all my tree nodes, but both of those > > methods seem wasteful. What methods do yall use to store the root node > > address? > > The persistent memory pool the tree resides in has a root index reserved in > particular for this purpose. The tree root address can be kept there. See: > Get_Root_Index, Set_Root_Index. > > http://www.dmitry-kazakov.de/ada/components.htm#Persistent.Memory_Pools.Set_Root_Index > > There are 16 independent values you can store there. Note that the root > address may change on tree update. After you have updated the tree before > committing the pool, get the root address and store it into one of the root > index values. Gotcha. Sorry that I missed that. I appreciate the response!