[compiler-rt] [scudo] Add EnableMultiRegions mode (PR #98076)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 12:14:25 PDT 2024


================
@@ -155,82 +176,111 @@ template <typename Config> class SizeClassAllocator64 {
 
   void unmapTestOnly() {
     for (uptr I = 0; I < NumClasses; I++) {
-      RegionInfo *Region = getRegionInfo(I);
-      {
-        ScopedLock ML(Region->MMLock);
-        MemMapT MemMap = Region->MemMapInfo.MemMap;
+      auto RegionInfoIter = RegionInfoManager.getRegionInfoIter(I);
----------------
ChiaHungDuan wrote:

There must be at least one RegionInfo instance (for multi-regions case, we allocate one in init()) so I take do-while loop when iterating RegionInfos. Let me know if you think it's still better for understanding (I'm fine with either way)

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


More information about the llvm-commits mailing list