[PATCH] D46617: [sanitizer] Use all available rounded up capacity

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 15:30:45 PDT 2018


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


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common.h:514
     CHECK_LE(size_, new_capacity);
-    T *new_data = (T *)MmapOrDie(new_capacity * sizeof(T),
-                                 "InternalMmapVector");
+    new_capacity *= sizeof(T);
+    new_capacity = RoundUpTo(new_capacity, GetPageSizeCached());
----------------
Maybe `new_capacity_bytes` for readability?


Repository:
  rL LLVM

https://reviews.llvm.org/D46617





More information about the llvm-commits mailing list