+static size_t
+npage_bytes(long npages)
+{
+ gc_assert(npages>=0);
+ return ((unsigned long)npages)*PAGE_BYTES;
+}
+
+/* Check that X is a higher address than Y and return offset from Y to
+ * X in bytes. */
+static inline
+size_t void_diff(void *x, void *y)
+{
+ gc_assert(x >= y);
+ return (pointer_sized_uint_t)x - (pointer_sized_uint_t)y;
+}
+