Avoids setting errno so it can be called by posix_memalign.
fn aligned_alloc_inner(alloc_alignment: usize, n: usize) ?[*]align(alignment_bytes) u8
fn aligned_alloc_inner(alloc_alignment: usize, n: usize) ?[*]align(alignment_bytes) u8 {
const size = std.math.cast(Header.Size, n) orelse return null;
const max_align = alignment.max(.fromByteUnits(alloc_alignment));
const max_align_bytes = max_align.toByteUnits();
const ptr: [*]align(alignment_bytes) u8 = @alignCast(
vtable.alloc(no_context, n + max_align_bytes, max_align, no_ra) orelse return null,
);
const base: [*]align(alignment_bytes) u8 = @alignCast(ptr + max_align_bytes);
return Header.set(base, max_align, size);
}