33#ifndef detail_ut_page_metadata_h
34#define detail_ut_page_metadata_h
87 static_assert(
len %
alignof(max_align_t) == 0,
88 "len must be divisible by alignof(max_align_t)");
94 "Metadata does not fit!");
102 return *
reinterpret_cast<datalen_t *
>(
static_cast<uint8_t *
>(data) -
len);
111 auto type = *
reinterpret_cast<page_type_t *
>(
static_cast<uint8_t *
>(data) -
213 static_assert(
len %
alignof(max_align_t) == 0,
214 "len must be divisible by alignof(max_align_t)");
#define CPU_PAGE_SIZE
Definition: config.h:312
Definition: ut0tuple.h:57
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
constexpr size_t calc_align(size_t n, size_t m)
Calculates the smallest multiple of m that is not smaller than n when m is a power of two.
Definition: helper.h:45
Page_type
Types of pages currently supported by ut:: library functions.
Definition: page_metadata.h:43
This file contains a set of libraries providing overloads for regular dynamic allocation routines whi...
Definition: aligned_alloc.h:48
required string type
Definition: replication_group_member_actions.proto:34
static MEM_ROOT mem
Definition: sql_servers.cc:100
Implementation bits and pieces for PFS metadata handling.
Helper struct implementing the type which represents the metadata for all types of PFS-aware page-ali...
Definition: page_metadata.h:198
static void page_type(void *mem, Page_type type)
Accessor to the page_type_t field.
Definition: page_metadata.h:234
static constexpr auto len
This is how much this metadata segment will be big.
Definition: page_metadata.h:203
size_t page_type_t
Definition: page_metadata.h:200
static Page_type page_type(void *data)
Sanity check so that we can be sure that the size of our metadata segment is such so that the pointer...
Definition: page_metadata.h:221
static constexpr auto page_type_offset
Suitably-aligned offset for PAGE-TYPE field.
Definition: page_metadata.h:206
Helper struct implementing the type which represents the metadata for all types of page-aligned alloc...
Definition: page_metadata.h:75
static constexpr auto len
This is how much tise metadata segment will be big.
Definition: page_metadata.h:77
static Page_type page_type(void *data)
Accessor to the page_type_t field.
Definition: page_metadata.h:110
static datalen_t datalen(void *data)
Sanity check so that we can be sure that the size of our metadata segment is such so that the next se...
Definition: page_metadata.h:101
static void datalen(void *mem, size_t length)
Accessor to the datalen_t field.
Definition: page_metadata.h:122
size_t page_type_t
Definition: page_metadata.h:81
static void page_type(void *mem, Page_type type)
Accessor to the page_type_t field.
Definition: page_metadata.h:132
size_t datalen_t
These are the types representing our memory fields.
Definition: page_metadata.h:80