|
libclod
C library for interacting with NBTs, region files, LOD data and other things.
|
Public Attributes | |
| block_ptr | ptr |
| Either the next node in the tree or the block value. | |
| uint32_t | data |
Definition at line 109 of file allocator.h.
| block_ptr branch::ptr |
Either the next node in the tree or the block value.
Definition at line 111 of file allocator.h.
| uint32_t branch::data |
Meaning depends on the type of branch, which is stored in ptr.
If ptr points to another node, it stores the actual key for lookups, as the location of the node in memory does not correlate with the location of the elements it's storing. Otherwise, ptr points to the actual block/blocks stored in the tree, and their location is the key.
If ptr points to a slab, it contains a used/free bitfield of elements in the slab. For split slabs 32 bits is not large enough, so represents groupings of elements instead of individual ones, and the individual use/free flags are stored in the slab block itself.
If ptr points to a span, it contains the size of the span in bytes.
Definition at line 127 of file allocator.h.