1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/// Default resident memory budget for `TextShapingCache` (4 MiB) before LRU eviction activates.
pub const TEXT_SHAPING_DEFAULT_BUDGET_BYTES: usize = 4 * 1024 * 1024;
/// Minimum configurable resident memory budget for `TextShapingCache` (4 KiB).
pub const TEXT_SHAPING_MIN_BUDGET_BYTES: usize = 4 * 1024;
/// Fixed per-entry metadata overhead counted toward `TextShapingCache::resident_bytes`.
pub const TEXT_SHAPING_ENTRY_OVERHEAD_BYTES: usize = 96;
/// Primary 64-bit FNV-1a offset basis for shaping key hashing.
pub const SHAPING_FNV_OFFSET_A: u64 = 0xcbf2_9ce4_8422_2325;
/// Secondary 64-bit hash seed for 128-bit collision-resistant shaping keys.
pub const SHAPING_FNV_OFFSET_B: u64 = 0x8422_2325_cbf2_9ce4;
/// 64-bit FNV-1a prime multiplier.
pub const SHAPING_FNV_PRIME: u64 = 0x0000_0100_0000_01b3;
/// 64-bit FxHash multiplicative avalanche constant for single-probe table lookups.
pub const SHAPING_FX_MULT: u64 = 0x517C_C1B7_2722_0A95;
/// Empty-slot sentinel inside open-addressed shaping index tables (bit 63 set).
pub const SHAPING_INDEX_EMPTY: u64 = u64MAX;
/// Tombstone sentinel marking an evicted slot reusable on subsequent inserts (bit 63 set).
pub const SHAPING_INDEX_TOMBSTONE: u64 = u64MAX - 1;
/// Sentinel LRU handle indicating the head/tail boundary of the intrusive O(1) LRU list.
pub const SHAPING_NODE_NONE: u32 = u32MAX;
/// High-bit tag distinguishing line-break LRU handles from shaping-run LRU handles.
pub const SHAPING_LRU_LINE_BREAK_BIT: u32 = 1 << 31;
/// Mask extracting the 31-bit arena slot index from a tagged LRU handle.
pub const SHAPING_LRU_INDEX_MASK: u32 = 0x7FFF_FFFF;
/// Initial power-of-two capacity for each open-addressed index table allocated lazily on first miss.
pub const SHAPING_INDEX_INIT_CAP: usize = 64;