code: public static long headerSize(Class clazz) {
      Preconditions.checkNotNull(clazz);
      // TODO Should be calculated based on the platform
      // TODO maybe unsafe.addressSize() would help?
      long len = 12; // JVM_64 has a 12 byte header 8 + 4 (with compressed pointers on)
      if (clazz.isArray()) {
        len += 4;
      }
      return len;
    }
docs: Returns the size of the header for an instance of this class (in bytes).
  
  <p>More information <a href="http://www.codeinstructions.com/2008/12/java-objects-memory-structure.html">http://www.codeinstructions.com/2008/12/java-objects-memory-structure.html</a>
  and <a href="http://stackoverflow.com/a/17348396/88646">http://stackoverflow.com/a/17348396/88646</a>
  
  <p><pre>
  ,------------------+------------------+------------------ +---------------.
  |    mark word(8)  | klass pointer(4) |  array size (opt) |    padding    |
  `------------------+------------------+-------------------+---------------'
  </pre>
  
  @param clazz
  @return