The value pool (segments)

yac.values_memory_size is split into segments of 4M each, managed as rings: writes advance a per-segment cursor and space is never freed per entry. When an allocation no longer fits, the cursor wraps back to the start of a segment — one recycle (the recycles counter of Yac::info). A recycle does not invalidate the segment at once: overwritten values stay readable until the wrapped cursor actually overwrites them, at which point their reads fail the integrity guard and turn into misses.

Two sizes matter for this pool: the total yac.values_memory_size must hold the working set of live values, and a single entry can hold at most 1 MB as stored (YAC_MAX_RAW_COMPRESSED_LEN). Values larger than that are therefore always compressed before being stored; a value that cannot shrink below 1 MB — most often because it is random data — is rejected and bumps the fails counter. The absolute size limit on the value itself is much higher: serialized values above 64 MB (YAC_MAX_VALUE_RAW_LEN, that is (1 << 26) - 1 bytes) are rejected outright.