comp.lang.ada
 help / color / mirror / Atom feed
From: Jeremiah <jeremiah.breeden@gmail.com>
Subject: Re: Questions concerning "Simple Components"
Date: Wed, 4 Nov 2015 04:39:52 -0800 (PST)
Date: 2015-11-04T04:39:52-08:00	[thread overview]
Message-ID: <da44c1b9-3982-40e8-becd-08cd357f1e3e@googlegroups.com> (raw)
In-Reply-To: <1v465ejy695lo$.47114uuwfga6$.dlg@40tude.net>

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!

      reply	other threads:[~2015-11-04 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  2:16 Questions concerning "Simple Components" Jeremiah
2015-11-04  8:33 ` Niklas Holsti
2015-11-04  9:09 ` Dmitry A. Kazakov
2015-11-04 12:39   ` Jeremiah [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox