Skip to main content

ARRAY_GROW_CAP

Constant ARRAY_GROW_CAP 

Source
pub const ARRAY_GROW_CAP: u32 = _; // 1_048_576u32
Expand description

Soft cap on array growth in a single raw_set call.

Prevents pathological inserts of a far-away integer key (e.g. t[1<<30] = 1) from allocating gigabytes when an array slot would be the wrong choice; falls back to the hash part for keys above the cap. Matches C-Lua’s behavioural bound, which is governed by MAXASIZE and the rehash density heuristic.