xo-alloc2 xo-arena: adopt AllocHeader.hpp
This commit is contained in:
parent
5d83363a69
commit
afa2942159
1 changed files with 0 additions and 28 deletions
|
|
@ -1,28 +0,0 @@
|
|||
/** @file AllocHeader.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
||||
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<AllocHeader>);
|
||||
}
|
||||
}
|
||||
|
||||
/* end AllocHeader.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue