[libc-commits] [libc] [libc] Add aligned_alloc (PR #96586)
Paul Kirth via libc-commits
libc-commits at lists.llvm.org
Tue Jun 25 10:03:32 PDT 2024
================
@@ -111,6 +113,24 @@ bool FreeList<NUM_BUCKETS>::add_chunk(span<cpp::byte> chunk) {
return true;
}
+template <size_t NUM_BUCKETS>
+template <typename Cond>
+span<cpp::byte> FreeList<NUM_BUCKETS>::find_chunk_if(Cond op) const {
+ for (size_t i = 0; i < chunks_.size(); ++i) {
----------------
ilovepi wrote:
Agree w/ @nickdesaulniers, the range-for makes the most sense to me, since you're not really using `i`.
https://github.com/llvm/llvm-project/pull/96586
More information about the libc-commits
mailing list