taco-db
0.1.0
|
The page header of a variable-length record data page. More...
Public Attributes | |
PageHeaderData | m_ph |
The file manager managed page header. Do not modify. More... | |
FieldOffset | m_ph_sz |
The size of the header including the user data area. More... | |
FieldOffset | m_fs_begin |
The offset to the beginning of the free space. More... | |
bool | m_has_hole: 1 |
Whether there might be some free space among the occupied space after the last compaction. More... | |
bool | __pad0__: 1 |
SlotId | m_cnt: 14 |
Number of items on this page. More... | |
SlotId | __pad1__:2 |
SlotId | m_nslots: 14 |
Number of slots in the slot array. More... | |
The page header of a variable-length record data page.
Its layout is as follows: | header | occupied space | free space | slot array | | fixedhdr | usrdata | (maybe holes ^ ^ ^ ^ ^ in middle) | | | | | | | PAGE_SIZE VarlenDataPageHeaderSize | | | | | | m_fs_begin | ph->m_ph_sz (maxaligned) | PAGE_SIZE - sizeof(SlotData) * m_nslots
The slot array grows backwards (from high address to low). The slot for slot ‘sid’ can be indexed by slot_array_end[-(int)sid]
, where slot_array_end = (SlotData*)(page_pointer + PAGE_SIZE)
.
bool taco::VarlenDataPageHeader::__pad0__ |
SlotId taco::VarlenDataPageHeader::__pad1__ |
SlotId taco::VarlenDataPageHeader::m_cnt |
Number of items on this page.
FieldOffset taco::VarlenDataPageHeader::m_fs_begin |
The offset to the beginning of the free space.
bool taco::VarlenDataPageHeader::m_has_hole |
Whether there might be some free space among the occupied space after the last compaction.
It can be an approximation but setting it to true too aggresively may result in too many space compaction calls.
SlotId taco::VarlenDataPageHeader::m_nslots |
Number of slots in the slot array.
PageHeaderData taco::VarlenDataPageHeader::m_ph |
The file manager managed page header. Do not modify.
FieldOffset taco::VarlenDataPageHeader::m_ph_sz |
The size of the header including the user data area.