Skip to main content

MAX_ALLOCATION_BYTES

Constant MAX_ALLOCATION_BYTES 

Source
pub const MAX_ALLOCATION_BYTES: usize = _ /* 9_223_372_036_854_775_807usize */;
Expand description

Maximum byte size representable by an allocation layout.

A Vec whose element type T is not zero-sized holds at most MAX_ALLOCATION_BYTES / size_of::<T>() elements. A Vec of a zero-sized type never allocates.