summaryrefslogtreecommitdiff
path: root/lib/scudo/scudo_allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scudo/scudo_allocator.h')
-rw-r--r--lib/scudo/scudo_allocator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/scudo/scudo_allocator.h b/lib/scudo/scudo_allocator.h
index 523808750eec2..29d85995a3eea 100644
--- a/lib/scudo/scudo_allocator.h
+++ b/lib/scudo/scudo_allocator.h
@@ -116,6 +116,11 @@ struct AP32 {
typedef SizeClassAllocator32<AP32> PrimaryAllocator;
#endif // SANITIZER_CAN_USE_ALLOCATOR64
+// __sanitizer::RoundUp has a CHECK that is extraneous for us. Use our own.
+INLINE uptr RoundUpTo(uptr Size, uptr Boundary) {
+ return (Size + Boundary - 1) & ~(Boundary - 1);
+}
+
#include "scudo_allocator_secondary.h"
#include "scudo_allocator_combined.h"