code: public static long sizeOfArray(int length, long elementSize) {
          return roundTo(SPEC.getArrayHeaderSize() + length * elementSize, SPEC.getObjectPadding());
      }
docs: Memory an array will consume
  @param length Number of elements in the array
  @param elementSize In-memory size of each element's primitive stored
  @return In-memory size of the array