Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 98e5d9c483bf077f4a40f05d8856fe88e115eb97..478395aafd7e0c0fa2e60cc069ad4a87fca78a76 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -282,6 +282,10 @@ const int kOneByteSize = kCharSize; |
const int kUC16Size = sizeof(uc16); // NOLINT |
+// Round up n to be a multiple of sz, where sz is a power of 2. |
+#define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1)) |
+ |
+ |
// The expression OFFSET_OF(type, field) computes the byte-offset |
// of the specified field relative to the containing type. This |
// corresponds to 'offsetof' (in stddef.h), except that it doesn't |