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/runtime_support.cc b/src/runtime_support.cc
index 00c58b5..6ca6e14 100644
--- a/src/runtime_support.cc
+++ b/src/runtime_support.cc
@@ -1203,7 +1203,7 @@
}
uint16_t width = table[1];
uint32_t size_in_bytes = size * width;
- memcpy((char*)array + Array::DataOffset().Int32Value(), (char*)&table[4], size_in_bytes);
+ memcpy((char*)array + Array::DataOffset(width).Int32Value(), (char*)&table[4], size_in_bytes);
return 0; // Success
}