Function object_alloc_test::foreach_align [] [src]

pub fn foreach_align<T, F: Fn(usize)>(f: F, max: usize)

Call a function once for each alignment.

foreach_align calls f once for each valid alignment of T not greater than max. If max is greater than any valid alignment of T, f is called for each valid alignment of T, and max is ignored.

foreach_align is useful for testing allocators whose behavior may be sensitive to requested alignment.