[all-commits] [llvm/llvm-project] 290e9d: [libc][__support] Fix linear fast path for first e...
Schrodinger ZHU Yifan via All-commits
all-commits at lists.llvm.org
Fri Jul 31 10:23:29 PDT 2026
Branch: refs/heads/users/schrodingerzhu/libc-use-tlsf-freestore
Home: https://github.com/llvm/llvm-project
Commit: 290e9d59155f0e52efce8094dc57babddb34af37
https://github.com/llvm/llvm-project/commit/290e9d59155f0e52efce8094dc57babddb34af37
Author: Yifan Zhu <yfzhu at google.com>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
M libc/src/__support/freestore.h
M libc/test/src/__support/freelist_heap_test.cpp
Log Message:
-----------
[libc][__support] Fix linear fast path for first exponential bin in TLSFFreeStoreImpl
Linear bins occupy indices 0 to EXP_BASE - 1. Index EXP_BASE (32) is the first exponential bin.
Previously, index_to_min_size and the linear fast path in find_and_remove_fit used <= EXP_BASE,
which treated index EXP_BASE as a linear bin. This caused find_and_remove_fit to return the
first block in bin EXP_BASE without checking if its size was sufficient for the request.
This change replaces <= with < when comparing against EXP_BASE in index_to_min_size and
find_and_remove_fit, and adds a unit test (NegativeTestForFullHeap).
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