Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

sizeClassIndex

SmpAllocator.sizeClassIndex
fn sizeClassIndex(len: usize, alignment: Alignment) usize

File

lib/std/heap/SmpAllocator.zig:218

Code

fn sizeClassIndex(len: usize, alignment: Alignment) usize {
    return @max(@bitSizeOf(usize) - @clz(len - 1), @backingInt(alignment), min_class) - min_class;
}