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.
alignedAlloc
Allocator.alignedAlloc
pubfnalignedAlloc(
self: Allocator,
comptimeT: type,
/// null means naturally alignedcomptimealignment: ?Alignment,
n: usize,
) Error![]align(if (alignment) |a| a.toByteUnits() else@alignOf(T)) T