[libc-commits] [libc] [libc] Refactor FreeTrie to support detached metadata and popmin (PR #203351)

Daniel Thornburgh via libc-commits libc-commits at lists.llvm.org
Fri Jul 17 18:45:58 PDT 2026


mysterymath wrote:

Can you clarify why this is necessary or beneficial for interaction with TLSF? (Aside from find_min; that seems fine.) Presently a `FreeTrie` is a Node pointer blessed with the knowledge necessary (a range) to use the pointer as a trie; if the goal is to allow the root of the trie to be stored elsewhere (say, in a TLSF bucket), then given how ephemerally `FreeTrie` objects are used in the follow-up patch, it seems semantically simpler to allow the root to be extracted via `root()` than to make this an object that expects storage of the pointer to be elsewhere. Then one can do manipulations on the freelist and store the new root back; rinse and repeat.

https://github.com/llvm/llvm-project/pull/203351


More information about the libc-commits mailing list