[all-commits] [llvm/llvm-project] 56f081: [libc][__support] Clean up index_to_min_size clamp...
Schrodinger ZHU Yifan via All-commits
all-commits at lists.llvm.org
Fri Jul 31 13:25:51 PDT 2026
Branch: refs/heads/users/schrodingerzhu/libc-use-tlsf-freestore
Home: https://github.com/llvm/llvm-project
Commit: 56f0811d67e3fdebc52d84c3edfb322d4cc7030b
https://github.com/llvm/llvm-project/commit/56f0811d67e3fdebc52d84c3edfb322d4cc7030b
Author: Yifan Zhu <yfzhu at google.com>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
M libc/src/__support/freestore.h
Log Message:
-----------
[libc][__support] Clean up index_to_min_size clamping by introducing LINEAR_BINS
Instead of forcing EXP_BASE (32) linear bins and clamping min_size with cpp::min,
this change introduces LINEAR_BINS to calculate the exact number of linear bins
needed to reach the exponential table boundary (29 on MSVC Windows where UNIT_SIZE is 8,
31 on Linux where UNIT_SIZE is 16).
Using LINEAR_BINS as the transition threshold in size_to_bit_index, index_to_min_size,
and find_and_remove_fit eliminates all runtime clamping, padding bins, and overshooting
while preserving strict monotonicity across all indices.
TAG=agy
CONV=cff84e8c-ee22-4f39-af3c-344d1e6f417b
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