diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h
index 1d37775..dac287f 100644
--- a/runtime/mirror/array-inl.h
+++ b/runtime/mirror/array-inl.h
@@ -27,10 +27,6 @@
 namespace art {
 namespace mirror {
 
-static inline size_t HeaderSize(size_t component_size) {
-  return sizeof(Object) + (component_size == sizeof(int64_t) ? 8 : 4);
-}
-
 template<VerifyObjectFlags kVerifyFlags>
 inline size_t Array::SizeOf() {
   // This is safe from overflow because the array was already allocated, so we know it's sane.
@@ -38,7 +34,7 @@
   // Don't need to check this since we already check this in GetClass.
   int32_t component_count =
       GetLength<static_cast<VerifyObjectFlags>(kVerifyFlags & ~kVerifyThis)>();
-  size_t header_size = HeaderSize(component_size);
+  size_t header_size = DataOffset(component_size).SizeValue();
   size_t data_size = component_count * component_size;
   return header_size + data_size;
 }
@@ -50,7 +46,7 @@
   DCHECK_GE(component_count, 0);
   DCHECK(array_class->IsArrayClass());
 
-  size_t header_size = HeaderSize(component_size);
+  size_t header_size = Array::DataOffset(component_size).SizeValue();
   size_t data_size = component_count * component_size;
   size_t size = header_size + data_size;
 
@@ -134,7 +130,7 @@
         heap->AllocObjectWithAllocator<kIsInstrumented, true>(self, array_class, size,
                                                               allocator_type, visitor));
   } else {
-    SetLengthToUsableSizeVisitor visitor(component_count, HeaderSize(component_size),
+    SetLengthToUsableSizeVisitor visitor(component_count, DataOffset(component_size).SizeValue(),
                                          component_size);
     result = down_cast<Array*>(
         heap->AllocObjectWithAllocator<kIsInstrumented, true>(self, array_class, size,
diff --git a/runtime/offsets.h b/runtime/offsets.h
index e2dba9d..ed4e49e 100644
--- a/runtime/offsets.h
+++ b/runtime/offsets.h
@@ -32,6 +32,10 @@
   uint32_t Uint32Value() const {
     return static_cast<uint32_t>(val_);
   }
+  size_t SizeValue() const {
+    return val_;
+  }
+
  protected:
   size_t val_;
 };
