On Wed, Nov 30, 2022 at 2:28 PM Masahiko Sawada <sawada.m...@gmail.com> wrote: > > On Fri, Nov 25, 2022 at 5:00 PM John Naylor > <john.nay...@enterprisedb.com> wrote:
> > These hacks were my work, but I think we can improve that by having two versions of NODE_HAS_FREE_SLOT -- one for fixed- and one for variable-sized nodes. For that to work, in "init-node" we'd need a branch to set fanout to zero for node256. That should be fine -- it already has to branch for memset'ing node128's indexes to 0xFF. > > Since the node has fanout regardless of fixed-sized and > variable-sized As currently coded, yes. But that's not strictly necessary, I think. >, only node256 is the special case where the fanout in > the node doesn't match the actual fanout of the node. I think if we > want to have two versions of NODE_HAS_FREE_SLOT, we can have one for > node256 and one for other classes. Thoughts? In your idea, for > NODE_HAS_FREE_SLOT for fixed-sized nodes, you meant like the > following? > > #define FIXED_NODDE_HAS_FREE_SLOT(node, class) > (node->base.n.count < rt_size_class_info[class].fanout) Right, and the other one could be VAR_NODE_... -- John Naylor EDB: http://www.enterprisedb.com