Skip to main content

MAX_SPANS

Constant MAX_SPANS 

Source
pub const MAX_SPANS: usize = _; // 67_108_864usize
Expand description

The most spans one tile heightfield may hold (hostile input: stacked surfaces could otherwise need gigabytes). Past it the tile fails. A Span is 10 bytes, so this bounds the span data of a tile at 2^26 * 10 B = 640 MiB (before the slack of the column vectors); a field added to Span raises it.