Or you can just use alignof(max_align_t), and your pointers will have the same alignment guarantees as malloc.
And I might be wrong, but even if you do accept a required alignment `align`, I think it's impossible in portable C to align a pointer `p` to it, unless you assume something not-strictly-portable about `(uintptr_t)p`, or `align` is less than some predetermined alignment that you used to allocate the char array.
And I might be wrong, but even if you do accept a required alignment `align`, I think it's impossible in portable C to align a pointer `p` to it, unless you assume something not-strictly-portable about `(uintptr_t)p`, or `align` is less than some predetermined alignment that you used to allocate the char array.