[all-commits] [llvm/llvm-project] 60de7d: [libc] Fix malloc Block alignment issue on riscv32...
Daniel Thornburgh via All-commits
all-commits at lists.llvm.org
Thu Jan 16 11:57:07 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 60de7dc886b9d83b0e2b6c9d7b73173d5d870388
https://github.com/llvm/llvm-project/commit/60de7dc886b9d83b0e2b6c9d7b73173d5d870388
Author: Daniel Thornburgh <dthorn at google.com>
Date: 2025-01-16 (Thu, 16 Jan 2025)
Changed paths:
M libc/src/__support/CMakeLists.txt
M libc/src/__support/block.h
M libc/src/__support/freelist_heap.h
M libc/test/src/__support/block_test.cpp
M libc/test/src/__support/freelist_heap_test.cpp
Log Message:
-----------
[libc] Fix malloc Block alignment issue on riscv32 (#117815)
Aligning blocks to max_align_t is neither necessary nor sufficient to
ensure that the usable_space() is so aligned. Instead, we make this an
invariant of Block and maintain it in init() and split().
This allows targets like riscv32 with small pointers and large
max_align_t to maintain the property that all available blocks are
aligned for malloc(). This change adjusts the tests to match and also
updates them closer to llvm-libc style.
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