diff --git a/include/xo/arena/AllocHeader.hpp b/include/xo/arena/AllocHeader.hpp new file mode 100644 index 0000000..ec99f59 --- /dev/null +++ b/include/xo/arena/AllocHeader.hpp @@ -0,0 +1,28 @@ +/** @file AllocHeader.hpp + * + * @author Roland Conybeare, Dec 2025 + **/ + +#pragma once + +#include +#include +#include + +namespace xo { + namespace mm { + struct AllocHeader { + using repr_type = std::uintptr_t; + using size_type = std::size_t; + + explicit AllocHeader(repr_type x) : repr_{x} {} + + repr_type repr_; + }; + + static_assert(sizeof(AllocHeader) == sizeof(AllocHeader::repr_type)); + static_assert(std::is_standard_layout_v); + } +} + +/* end AllocHeader.hpp */