@Override
    public int hashMap(int entry) {
      // base  = JAVA32_OBJECT + PRIMITIVES1 * 4 + JAVA32_FIELDREF * 3 + JAVA32_ARRAY;
      // entry = JAVA32_OBJECT + JAVA32_FIELDREF + PRIMITIVES1
      return hashMapBase() + hashMapEntry() * entry;
    }
Estimation of memory footprint of object
storage-api/src/java/org/apache/hadoop/hive/ql/util/JavaDataModel.java