[PATCH] D61385: [scudo][standalone] Introduce the Quarantine

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 11:51:44 PDT 2019


morehouse accepted this revision.
morehouse added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/scudo/standalone/quarantine.h:138
+    uptr TotalQuarantineChunks = 0;
+    for (auto It = List.begin(); It != List.end(); ++It) {
+      BatchCount++;
----------------
cryptoad wrote:
> morehouse wrote:
> > Does range-based loop work here?
> If you could please clarify, I am unsure as to which range you are referring to.
```
for (const QuarantineBatch &Batch : List) {
  ...
}
```


================
Comment at: lib/scudo/standalone/quarantine.h:157
+        "Global quarantine stats: batches: %zd; bytes: %zd (user: %zd); "
+        "chunks: %zd (capacity: %zd); %d%% chunks used; %d%% memory overhead\n",
+        BatchCount, TotalBytes, TotalQuarantinedBytes, TotalQuarantineChunks,
----------------
morehouse wrote:
> Since `uptr`, probably want `%zd` for all.
Also for memory overhead


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D61385





More information about the llvm-commits mailing list