[libc-commits] [libc] [libc][malloc] Ensure a minimum block alignment of 4 (PR #169447)
Daniel Thornburgh via libc-commits
libc-commits at lists.llvm.org
Tue Nov 25 08:59:29 PST 2025
mysterymath wrote:
Aha, didn't think this would trigger much discussion! This is specifically for the alignment of the Block structure, but the way we've implemented things, that actually has no bearing on the alignment of the returned pointers carved out of blocks, which are managed by direct address math when doing allocations. The only alignment requirements for Block itself are that it be correctly alignment for its contents (two size_t), and that it be aligned to at least 4, so that the bottom two bits of block sizes are always logically zero and thus free to store flags.
https://github.com/llvm/llvm-project/pull/169447
More information about the libc-commits
mailing list