[all-commits] [llvm/llvm-project] 25f038: [libc][malloc] Reduce block overhead by 4 bytes pl...
Daniel Thornburgh via All-commits
all-commits at lists.llvm.org
Tue Jul 23 15:56:45 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 25f0381ba128e012e494701286450a374bf366a8
https://github.com/llvm/llvm-project/commit/25f0381ba128e012e494701286450a374bf366a8
Author: Daniel Thornburgh <dthorn at google.com>
Date: 2024-07-23 (Tue, 23 Jul 2024)
Changed paths:
M libc/src/__support/block.h
Log Message:
-----------
[libc][malloc] Reduce block overhead by 4 bytes plus alignment effects (#99945)
The unused padding and alignment fields were removed. The used and last
bits were stashed into the lower two bits of the next chunk offset.
(This is a very typical trick for Knuth boundary tags.) The chunk
offsets were recast as counting bytes rather than multiples of the
alignment. To ensure that the lowest two bits are not significant, the
minimum alignment was bumped to 4. This shouldn't affect anything in
practice, since alignof(max_align_t) is overwhelmingly likely to be 8.
See #98096
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list