#ifndef INCLUDE_CPPGC_INTERNAL_API_CONSTANTS_H_
#define INCLUDE_CPPGC_INTERNAL_API_CONSTANTS_H_
#include <cstddef>
#include <cstdint>
#include "v8config.h"
namespace cppgc {
namespace internal {
namespace api_constants {
constexpr size_t kKB = …;
constexpr size_t kMB = …;
constexpr size_t kGB = …;
static constexpr size_t kFullyConstructedBitFieldOffsetFromPayload = …;
static constexpr uint16_t kFullyConstructedBitMask = …;
static constexpr size_t kPageSizeBits = …;
static constexpr size_t kPageSize = …;
#if defined(V8_HOST_ARCH_ARM64) && defined(V8_OS_DARWIN)
constexpr size_t kGuardPageSize = 0;
#elif defined(V8_HOST_ARCH_PPC64)
constexpr size_t kGuardPageSize = 0;
#elif defined(V8_HOST_ARCH_LOONG64) || defined(V8_HOST_ARCH_MIPS64)
constexpr size_t kGuardPageSize = 0;
#else
constexpr size_t kGuardPageSize = …;
#endif
static constexpr size_t kLargeObjectSizeThreshold = …;
#if defined(CPPGC_POINTER_COMPRESSION)
#if defined(CPPGC_ENABLE_LARGER_CAGE)
constexpr unsigned kPointerCompressionShift = …;
#else
constexpr unsigned kPointerCompressionShift = 1;
#endif
#endif
#if defined(CPPGC_CAGED_HEAP)
#if defined(CPPGC_2GB_CAGE)
constexpr size_t kCagedHeapDefaultReservationSize =
static_cast<size_t>(2) * kGB;
constexpr size_t kCagedHeapMaxReservationSize =
kCagedHeapDefaultReservationSize;
#else
constexpr size_t kCagedHeapDefaultReservationSize = …;
#if defined(CPPGC_POINTER_COMPRESSION)
constexpr size_t kCagedHeapMaxReservationSize = …;
#else
constexpr size_t kCagedHeapMaxReservationSize =
kCagedHeapDefaultReservationSize;
#endif
#endif
constexpr size_t kCagedHeapReservationAlignment = …;
#endif
static constexpr size_t kDefaultAlignment = …;
static constexpr size_t kMaxSupportedAlignment = …;
constexpr size_t kAllocationGranularity = …;
constexpr size_t kCachelineSize = …;
}
}
}
#endif