[PATCH v3 4/4] malloc: alignment might change in future versions
Paul Eggert
eggert@cs.ucla.edu
Thu Feb 26 18:41:21 GMT 2026
On 2026-02-26 04:47, Florian Weimer wrote:
>> --- a/manual/lang.texi
>> +++ b/manual/lang.texi
>> @@ -597,7 +597,7 @@ types have a fundamental alignment and lack stricter alignment specifiers.
>> In @theglibc{}, the value of @code{alignof (max_align_t)} is 16 on
>> most architectures. However, it is 8 on 32-bit architectures that do
>> not require 16-byte alignment from @code{malloc} to support predefined
>> -types.
>> +types. The value may change in future releases.
> Can we really change the definition of the type, though? That's close
> to an ABI event.
>
> Rest looks okay to me.
Thanks, I installed the patches without that sentence.
However, the manual should discuss the ABI effect of any possible
differences in max_align_t, or in intmax_t/uintmax_t for that matter.
This is relevant partly because C23 (unlike earlier C standards) allows
intmax_t to be narrower than int128_t (assuming the latter type exists,
which it really should with GCC).
I'll propose further patches along those lines.
More information about the Libc-alpha
mailing list