public int lengthOfTimestamp() {
    // object overhead + 4 bytes for int (nanos) + 4 bytes of padding
    return object() + primitive2();
  }
Estimation of memory footprint of object
storage-api/src/java/org/apache/hadoop/hive/ql/util/JavaDataModel.java