#ifndef PARTITION_ALLOC_PARTITION_FREELIST_ENTRY_H_
#define PARTITION_ALLOC_PARTITION_FREELIST_ENTRY_H_
#include <cstddef>
#include "partition_alloc/buildflags.h"
#include "partition_alloc/partition_alloc_base/bits.h"
#include "partition_alloc/partition_alloc_base/compiler_specific.h"
#include "partition_alloc/partition_alloc_base/component_export.h"
#include "partition_alloc/partition_alloc_constants.h"
namespace partition_allocinternal
#include "partition_alloc/encoded_next_freelist.h"
#if PA_BUILDFLAG(USE_FREELIST_DISPATCHER)
#include "partition_alloc/pool_offset_freelist.h"
#endif
namespace partition_alloc::internal {
static_assert …;
#if PA_BUILDFLAG(USE_FREELIST_DISPATCHER)
static_assert …;
#endif
enum class PartitionFreelistEncoding { … };
#if PA_BUILDFLAG(USE_FREELIST_DISPATCHER)
PartitionFreelistEntry;
#else
using PartitionFreelistEntry = EncodedNextFreelistEntry;
#endif
#if PA_BUILDFLAG(USE_FREELIST_DISPATCHER)
static_assert …;
static_assert …;
#endif
struct PartitionFreelistDispatcher { … };
#if PA_BUILDFLAG(USE_FREELIST_DISPATCHER)
template <PartitionFreelistEncoding encoding>
struct PartitionFreelistDispatcherImpl final : PartitionFreelistDispatcher { … };
inline static constexpr PartitionFreelistDispatcherImpl<
PartitionFreelistEncoding::kEncodedFreeList>
kEncodedImplDispatcher{ … };
inline static constexpr PartitionFreelistDispatcherImpl<
PartitionFreelistEncoding::kPoolOffsetFreeList>
kPoolOffsetImplDispatcher{ … };
PA_ALWAYS_INLINE const PartitionFreelistDispatcher*
PartitionFreelistDispatcher::Create(PartitionFreelistEncoding encoding) { … }
#endif
}
#endif