public static int round(int size) {
    JavaDataModel model = get();
    if (model == JAVA32 || size % 8 == 0) {
      return size;
    }
    return ((size + 8) >> 3) << 3;
  }
Estimation of memory footprint of object
storage-api/src/java/org/apache/hadoop/hive/ql/util/JavaDataModel.java