Perhaps it's just my usual stupidity, but I have a problem with the bitree.
commitbf444dd3a5544085603c2b42536ed620b431ada5
authorstrange <kawk256@gmail.com>
Mon, 8 Feb 2010 01:03:59 +0000 (7 18:03 -0700)
committerstrange <kawk256@gmail.com>
Mon, 8 Feb 2010 01:03:59 +0000 (7 18:03 -0700)
tree9c1f81c8bb4ed382b841a02f7d84738eb06d7ed2
parent3a7268f074bc2c79ebe2eb04b3305e0efc39f3ef
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 . . .
gui/src/storage/AllocEvent.cpp