Beispiel #1
0
 public long getObjectSize() {
   ArrayKlass klass = (ArrayKlass) getKlass();
   // We have to fetch the length of the array, shift (multiply) it
   // appropriately, up to wordSize, add the header, and align to
   // object size.
   long s = getLength() << klass.getLog2ElementSize();
   s += klass.getArrayHeaderInBytes();
   s = Oop.alignObjectSize(s);
   return s;
 }