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/hprof/hprof.cc b/src/hprof/hprof.cc
index 66cb24d..be37207 100644
--- a/src/hprof/hprof.cc
+++ b/src/hprof/hprof.cc
@@ -421,7 +421,7 @@
         rec->AddId(LookupClassId(clazz));
 
         // Dump the elements, which are always objects or NULL.
-        rec->AddIdList((const HprofObjectId *)aobj->GetRawData(), length);
+        rec->AddIdList((const HprofObjectId *)aobj->GetRawData(sizeof(Object*)), length);
       } else {
         size_t size;
         HprofBasicType t = PrimitiveToBasicTypeAndSize(clazz->GetComponentType()->GetPrimitiveType(), &size);
@@ -441,13 +441,13 @@
 #if DUMP_PRIM_DATA
         // Dump the raw, packed element values.
         if (size == 1) {
-          rec->AddU1List((const uint8_t *)aobj->GetRawData(), length);
+          rec->AddU1List((const uint8_t *)aobj->GetRawData(sizeof(uint8_t)), length);
         } else if (size == 2) {
-          rec->AddU2List((const uint16_t *)(void *)aobj->GetRawData(), length);
+          rec->AddU2List((const uint16_t *)(void *)aobj->GetRawData(sizeof(uint16_t)), length);
         } else if (size == 4) {
-          rec->AddU4List((const uint32_t *)(void *)aobj->GetRawData(), length);
+          rec->AddU4List((const uint32_t *)(void *)aobj->GetRawData(sizeof(uint32_t)), length);
         } else if (size == 8) {
-          rec->AddU8List((const uint64_t *)aobj->GetRawData(), length);
+          rec->AddU8List((const uint64_t *)aobj->GetRawData(sizeof(uint64_t)), length);
         }
 #endif
       }