[PATCH] D40862: [scudo] Correct performance regression in Secondary

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 15:26:51 PST 2017


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


================
Comment at: lib/scudo/scudo_allocator_secondary.h:131
 
-  const uptr AlignedReservedAddressRangeSize =
-      RoundUpTo(sizeof(ReservedAddressRange), MinAlignment);
-  const uptr HeadersSize =
+  static const uptr AlignedReservedAddressRangeSize =
+      (sizeof(ReservedAddressRange) + MinAlignment - 1) & ~(MinAlignment - 1);
----------------
Maybe use constexpr?


https://reviews.llvm.org/D40862





More information about the llvm-commits mailing list