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

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 12:14:35 PDT 2019


cryptoad marked 6 inline comments as done.
cryptoad added inline comments.


================
Comment at: lib/scudo/standalone/quarantine.h:138
+    uptr TotalQuarantineChunks = 0;
+    for (auto It = List.begin(); It != List.end(); ++It) {
+      BatchCount++;
----------------
morehouse wrote:
> 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) {
>   ...
> }
> ```
It actually does work, thanks! Changed it.


================
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:
> morehouse wrote:
> > Since `uptr`, probably want `%zd` for all.
> Also for memory overhead
Doh! Sorry I missed it. Also I forgot to clang-format post change.


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