Changes in kernel/generic/src/adt/btree.c [1ab4aca:55b77d9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/btree.c
r1ab4aca r55b77d9 38 38 * 39 39 * The B+tree has the following properties: 40 * @li it is a bal anced 3-4-5 tree (i.e. BTREE_M = 5)40 * @li it is a ballanced 3-4-5 tree (i.e. BTREE_M = 5) 41 41 * @li values (i.e. pointers to values) are stored only in leaves 42 42 * @li leaves are linked in a list 43 43 * 44 * Be careful when using these trees. They need to allocate44 * Be carefull when using these trees. They need to allocate 45 45 * and deallocate memory for their index nodes and as such 46 46 * can sleep. … … 146 146 * also makes use of this feature. 147 147 * 148 * @param node B-tree node into w hich the new key is to be inserted.148 * @param node B-tree node into wich the new key is to be inserted. 149 149 * @param key The key to be inserted. 150 150 * @param value Pointer to value to be inserted. … … 270 270 * This feature is used during insert by right rotation. 271 271 * 272 * @param node B-tree node into w hich the new key is to be inserted.272 * @param node B-tree node into wich the new key is to be inserted. 273 273 * @param key The key to be inserted. 274 274 * @param value Pointer to value to be inserted. … … 463 463 if (rnode->keys < BTREE_MAX_KEYS) { 464 464 /* 465 * The rota tion can be done. The right sibling has free space.465 * The rotaion can be done. The right sibling has free space. 466 466 */ 467 467 node_insert_key_and_rsubtree(node, inskey, insvalue, rsubtree); … … 484 484 * the median will be copied there. 485 485 * 486 * @param node B-tree node w hich is going to be split.486 * @param node B-tree node wich is going to be split. 487 487 * @param key The key to be inserted. 488 488 * @param value Pointer to the value to be inserted. … … 562 562 if (node->keys < BTREE_MAX_KEYS) { 563 563 /* 564 * Node con tains enough space, the key can be stored immediately.564 * Node conatins enough space, the key can be stored immediately. 565 565 */ 566 566 node_insert_key_and_rsubtree(node, key, value, rsubtree); … … 806 806 807 807 /* 808 * The key can be immediatel y removed.808 * The key can be immediatelly removed. 809 809 * 810 810 * Note that the right subtree is removed because when
Note:
See TracChangeset
for help on using the changeset viewer.