Perhaps it's just my usual stupidity, but I have a problem with the bitree.
I understand how a tree such as this usually functions, splitting the address
space until every block is in exactly one node, and no more. Makes sense . . .
Here's the problem I have: what happens when a block is exactly on the
division? For example, imagine a very simple tree, with five elements . . .
/a\
/b\ /c\
/d\ 3 4 5
1 2
Addreses:
a: 0x100
b: 0x16
c: 0x200
d: 0x11
1: 0x10
2: 0x12
3: 0x18
4: 0x105
5: 0x253
(There would be some additional nodes in there, but I've left them out for
clarity -- between a and b, for example.)
Now, if I were to insert an element at 0x20, it would be simple -- simply
split off 3 (which is at 0x18) into a node (e, address would be 0x19), and add
3 as the left element, and 6 (the new element) as the right element.
Fine. What happens, though, if I want to insert a block at 0x19? What address
does e have then? It has to have a value less than 0x19, and more than 0x18,
or, in other words, a non-integer . . .