[all-commits] [llvm/llvm-project] e7eed7: Refactor FreeTrie and Implement TLSF FreeStore

Schrodinger ZHU Yifan via All-commits all-commits at lists.llvm.org
Thu Jun 11 15:24:09 PDT 2026


  Branch: refs/heads/users/schrodingerzhu/libc-use-tlsf-freestore
  Home:   https://github.com/llvm/llvm-project
  Commit: e7eed7b4e0600b9d62c6c44ebf355eb1bbfc2c3c
      https://github.com/llvm/llvm-project/commit/e7eed7b4e0600b9d62c6c44ebf355eb1bbfc2c3c
  Author: Yifan Zhu <yfzhu at google.com>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M libc/src/__support/freelist.h
    M libc/src/__support/freelist_heap.h
    M libc/src/__support/freestore.h
    M libc/src/__support/freetrie.h
    M libc/test/src/__support/freestore_test.cpp
    M libc/test/src/__support/freetrie_test.cpp

  Log Message:
  -----------
  Refactor FreeTrie and Implement TLSF FreeStore

- Make FreeTrie a proxy holding root by reference.
- Move root and range storage outside FreeTrie (into FreeStore).
- Add find_min and pop_min implementations.
- Update tests and add pop_min test.
- Replace freestore.h with TLSF implementation.
- Add USE_TRIE_FOR_LARGE_FREELIST option to use FreeTrie in TLSF.
- Remove obsolete set_range interface from FreeStore, FreeListHeap, and tests.

TAG=agy
CONV=fe3b4efa-7a5b-4c74-8257-e53f0d6e4850


  Commit: 4256b805f2834e6a4a3b0d39e32428f908008f0c
      https://github.com/llvm/llvm-project/commit/4256b805f2834e6a4a3b0d39e32428f908008f0c
  Author: Yifan Zhu <yfzhu at google.com>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M libc/src/__support/freestore.h

  Log Message:
  -----------
  [libc] restrict FreeTrie to the overflow bin in TLSF

- Rename config option to USE_TRIE_FOR_OVERFLOW_BIN.
- Restrict FreeTrie usage to only the last overflow bin (bit_index == TOTAL_BITS - 1).
- Simplify exact fit search to only use FreeList, as large sizes now always go to the overflow bin.
- This improves TLSF throughput for large sizes while retaining Trie's packing efficiency for very large blocks.

TAG=agy
CONV=fe3b4efa-7a5b-4c74-8257-e53f0d6e4850


Compare: https://github.com/llvm/llvm-project/compare/e7eed7b4e060%5E...4256b805f283

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