Skip to main content

min_allocator_size

Function min_allocator_size 

Source
pub fn min_allocator_size(size: u32, alignment: NonZeroU32) -> u32
Expand description

The smallest allocator size that can hold an allocation of size units at the given alignment.

See the module documentation for why an allocator must be sized this way rather than with size itself.

ยงPanics

Panics if size cannot be rounded up to alignment within a u32.