Move the duplicated alignment macros to a common location.
Change-Id: I11cb1c3034a3a4e7d8e8c0793f5c85fa623155b2
diff --git a/vm/Common.h b/vm/Common.h
index 208ed20..19de943 100644
--- a/vm/Common.h
+++ b/vm/Common.h
@@ -40,6 +40,11 @@
#define LIKELY(exp) (__builtin_expect((exp) != 0, true))
#define UNLIKELY(exp) (__builtin_expect((exp) != 0, false))
+#define ALIGN_UP(x, n) (((size_t)(x) + (n) - 1) & ~((n) - 1))
+#define ALIGN_DOWN(x, n) ((size_t)(x) & -(n))
+#define ALIGN_UP_TO_PAGE_SIZE(p) ALIGN_UP(p, SYSTEM_PAGE_SIZE)
+#define ALIGN_DOWN_TO_PAGE_SIZE(p) ALIGN_DOWN(p, SYSTEM_PAGE_SIZE)
+
/*
* If "very verbose" logging is enabled, make it equivalent to LOGV.
* Otherwise, make it disappear.