The BTree-On-Heap (BTH) dialog gives a graphical representation of a BTH stored inside a heap.


At the top of the BTH dialog is a file range control. It is NYI for this dialog.

Below that is the BTH header. This is a heap allocation (specified when this dialog was opened) which gives some basic information about the BTH.
  • bMagic Must be 0xB5.
  • cbKey Size of the key type
  • cbEnt Size of the value type
  • bIdxLevels The level of the root allocation of this BTH. This is important because unlike the BBT/NBT, each indvidual "node" of the tree doesn't have metadata describing it.
  • hidRoot The root allocation of the BTH structure.

Next comes a tree control, displaying the BTH. Each nonleaf node of the BTH is an individual heap allocation (the root of which is in the BTH header). The leaf allocations contain the key/value pairs. Note that the BTH itself assigns no special meaning to the key/value pairs; it is up to the users of the BTH to interpret them appropriately.

Because an individual BTH allocation can be up to 3.8k in size (the max size of a single heap allocation), and that can store quite a few key value pairs, it is common to see a BTH which consist of a single leaf allocation (bIdxLevels = 0), as shown here.

Last edited Apr 5, 2010 at 6:31 PM by terrymah, version 3


No comments yet.