18 #ifndef FOEDUS_STORAGE_ARRAY_ARRAY_PAGE_HPP_
19 #define FOEDUS_STORAGE_ARRAY_ARRAY_PAGE_HPP_
70 bool is_leaf()
const {
return level_ == 0; }
79 uint16_t payload_size,
86 uint16_t payload_size,
95 return reinterpret_cast<const Record*
>(
102 return reinterpret_cast<Record*
>(
122 uint16_t payload_size_;
151 static_assert(
sizeof(ArrayPage) ==
kPageSize,
"sizeof(ArrayPage) is not kPageSize");
152 static_assert(
sizeof(ArrayPage) -
sizeof(ArrayPage::Data) ==
kHeaderSize,
"kHeaderSize is wrong");
157 #endif // FOEDUS_STORAGE_ARRAY_ARRAY_PAGE_HPP_
uint16_t get_leaf_record_count() const
DualPagePointer interior_data[kInteriorFanout]
T align8(T value)
8-alignment.
Represents one record in our key-value store.
Represents a pointer to another page (usually a child page).
Definitions of IDs in this package and a few related constant values.
const uint16_t kRecordOverhead
Byte size of system-managed region per each record.
uint8_t unused_dummy_func_reserved1() const
uint32_t StorageId
Unique ID for storage.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Record * get_leaf_record(uint16_t record, uint16_t payload_size) __attribute__((always_inline))
void initialize_snapshot_page(Epoch initial_epoch, StorageId storage_id, SnapshotPagePointer page_id, uint16_t payload_size, uint8_t level, const ArrayRange &array_range)
Called only when this page is initialized.
Represents a pointer to a volatile page with modification count for preventing ABA.
Forward declarations of classes in root package.
Represents one data page in Array Storage.
void array_volatile_page_init(const VolatilePageInitArguments &args)
volatile page initialize callback for ArrayPage.
Data union for either leaf (dynamic size) or interior (fixed size).
const uint16_t kDataSize
Byte size of data region in each page of array storage.
StorageId get_storage_id() const
const DualPagePointer & get_interior_record(uint16_t record) const __attribute__((always_inline))
const ArrayRange & get_array_range() const
const Record * get_leaf_record(uint16_t record, uint16_t payload_size) const __attribute__((always_inline))
Definitions of IDs in this package and a few related constant values.
uint64_t SnapshotPagePointer
Page ID of a snapshot page.
Set of arguments, both inputs and outputs, given to each volatile page initializer.
uint32_t unused_dummy_func_reserved2() const
Represents an offset range in an array storage.
char leaf_data[kInteriorFanout *sizeof(DualPagePointer)]
const uint16_t kHeaderSize
Byte size of header in each page of array storage.
const PageHeader & header() const
ArrayPage & operator=(const ArrayPage &other)=delete
DualPagePointer & get_interior_record(uint16_t record) __attribute__((always_inline))
Definitions of IDs in this package and a few related constant values.
const uint16_t kInteriorFanout
Max number of entries in an interior page of array storage.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
#define ALWAYS_INLINE
A function suffix to hint that the function should always be inlined.
uint16_t get_payload_size() const
const uint16_t kPageSize
A constant defining the page size (in bytes) of both snapshot pages and volatile pages.
uint8_t get_level() const
void initialize_volatile_page(Epoch initial_epoch, StorageId storage_id, VolatilePagePointer page_id, uint16_t payload_size, uint8_t level, const ArrayRange &array_range)