Remove pad word from arrays

This change removes the 4 byte pad from all arrays except longs and
doubles. It saves 76kb from the boot image, and will also reduce the
size of arrays in the heap (and thereby reduce garbage collection).

Change-Id: I3ff277d5bf14c57c0f7552215818e588ec6cc275
diff --git a/src/check_jni.cc b/src/check_jni.cc
index 84c7376..6dc47f7 100644
--- a/src/check_jni.cc
+++ b/src/check_jni.cc
@@ -1110,8 +1110,9 @@
   ScopedJniThreadState ts(env);
 
   Array* a = Decode<Array*>(ts, java_array);
-  size_t byte_count = a->GetLength() * a->GetClass()->GetComponentSize();
-  void* result = GuardedCopy::Create(a->GetRawData(), byte_count, true);
+  size_t component_size = a->GetClass()->GetComponentSize();
+  size_t byte_count = a->GetLength() * component_size;
+  void* result = GuardedCopy::Create(a->GetRawData(component_size), byte_count, true);
   if (isCopy != NULL) {
     *isCopy = JNI_TRUE;
   }
@@ -1134,7 +1135,7 @@
 
   if (mode != JNI_ABORT) {
     size_t len = GuardedCopy::FromData(dataBuf)->original_length;
-    memcpy(a->GetRawData(), dataBuf, len);
+    memcpy(a->GetRawData(a->GetClass()->GetComponentSize()), dataBuf, len);
   }
   if (mode != JNI_COMMIT) {
     GuardedCopy::Destroy(dataBuf);