[compiler-rt] [scudo] Store more blocks in each TransferBatch (PR #70390)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 13:24:54 PDT 2023


================
@@ -746,33 +726,57 @@ template <typename Config> class SizeClassAllocator32 {
       // Block used by `BatchGroup` is from BatchClassId. Turn the block into
       // `TransferBatch` with single block.
       TransferBatchT *TB = reinterpret_cast<TransferBatchT *>(BG);
-      TB->clear();
-      TB->add(
-          compactPtr(SizeClassMap::BatchClassId, reinterpret_cast<uptr>(TB)));
+      ToArray[0] =
+          compactPtr(SizeClassMap::BatchClassId, reinterpret_cast<uptr>(TB));
       Sci->FreeListInfo.PoppedBlocks += 1;
-      return TB;
+      return 1U;
     }
 
+    // So far, instead of always fill blocks to `MaxBlockCount`, we only exmaine
----------------
cferris1000 wrote:

examine

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


More information about the llvm-commits mailing list