[PATCH] D74178: [scudo][standalone] 32-bit improvement

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 16:23:37 PST 2020


pcc added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/primary32.h:91
     // TODO(kostyak): unmap the TransferBatch regions as well.
-    for (uptr I = 0; I < NumRegions; I++)
+    for (uptr I = MinRegionIndex; I <= MaxRegionIndex`; I++)
       if (PossibleRegions[I])
----------------
Typo?


================
Comment at: compiler-rt/lib/scudo/standalone/primary32.h:261
     if (LIKELY(Region)) {
-      if (ClassId) {
-        const uptr RegionIndex = computeRegionId(Region);
----------------
Why remove this if? Looks like we never end up going from non-zero to zero in `PossibleRegions` so the only effect is that we end up setting `MinRegionIndex`/`MaxRegionIndex` to cover transfer batches which are ignored by `iterateOverBlocks`/`releaseToOSMaybe` anyway?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74178/new/

https://reviews.llvm.org/D74178





More information about the llvm-commits mailing list