Appearance
namespace flake::sizing
Types
| Name | |
|---|---|
| struct | flake::sizing::Value One variable-length property-value class in the deployment's data model. |
Functions Overview
| Name | |
|---|---|
| constexpr std::size_t | slots(const Value * v, std::size_t n, std::size_t lo, std::size_t hi) Peak live instances whose size falls in the half-open band ``(lo, hi] — the values flakeAlloc serves from the bucket of width hi (the class above lo). |
| constexpr std::size_t | largest(const Value * v, std::size_t n) Largest declared value size. |
| constexpr std::size_t | bytepoolBytes(std::size_t tinySize, std::size_t tinyCount, std::size_t smallSize, std::size_t smallCount, std::size_t medSize, std::size_t medCount, std::size_t largeSize, std::size_t largeCount) Total bytes a four-class layout reserves — the value that lands in FLAKE_ARENA_BYTEPOOL_BYTES. |
Function Details
function slots
cpp
constexpr std::size_t slots(
const Value * v,
std::size_t n,
std::size_t lo,
std::size_t hi
)Peak live instances whose size falls in the half-open band ``(lo, hi] — the values flakeAlloc serves from the bucket of width hi (the class above lo).
Clamped to 1: FlakeBytePool requires SlotCount > 0, so even an empty class reserves a single slot. Keep that class's *_SIZE small to bound the cost of that mandatory slot.
function largest
cpp
constexpr std::size_t largest(
const Value * v,
std::size_t n
)Largest declared value size.
Use it to pick FLAKE_POOL_LARGE_SIZE, or to static_assert that no value exceeds it and would always spill to the overhang.
function bytepoolBytes
cpp
constexpr std::size_t bytepoolBytes(
std::size_t tinySize,
std::size_t tinyCount,
std::size_t smallSize,
std::size_t smallCount,
std::size_t medSize,
std::size_t medCount,
std::size_t largeSize,
std::size_t largeCount
)Total bytes a four-class layout reserves — the value that lands in FLAKE_ARENA_BYTEPOOL_BYTES.
Handy for a build-time report or a budget static_assert.