Skip to main content

MAX_FIELD_LEN

Constant MAX_FIELD_LEN 

Source
pub const MAX_FIELD_LEN: usize = _; // 536_870_912usize
Expand description

Maximum length we’ll allocate when reading a length-prefixed field. 512 MB is generous for any realistic key or value — a corrupt or malicious length prefix won’t cause a multi-gigabyte allocation.