Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
btree_head Struct Reference

#include <btree.h>

Data Fields

unsigned longnode
 
mempool_tmempool
 
int height
 

Detailed Description

DOC: B+Tree basics

A B+Tree is a data structure for looking up arbitrary (currently allowing unsigned long, u32, u64 and 2 * u64) keys into pointers. The data structure is described at http://en.wikipedia.org/wiki/B-tree, we currently do not use binary search to find the key on lookups.

Each B+Tree consists of a head, that contains bookkeeping information and a variable number (starting with zero) nodes. Each node contains the keys and pointers to sub-nodes, or, for leaf nodes, the keys and values for the tree entries.

Each node in this implementation has the following layout: [key1, key2, ..., keyN] [val1, val2, ..., valN]

Each key here is an array of unsigned longs, geo->no_longs in total. The number of keys and values (N) is geo->no_pairs. struct btree_head - btree head

: the first node in the tree : mempool used for node allocations : current of the tree

Definition at line 34 of file btree.h.

Field Documentation

int height

Definition at line 37 of file btree.h.

mempool_t* mempool

Definition at line 36 of file btree.h.

unsigned long* node

Definition at line 35 of file btree.h.


The documentation for this struct was generated from the following file: