private static int sizeType(Class<?> t) {

    if (t == Boolean.TYPE) {
      return 1;
    } else if (t == Byte.TYPE) {
      return 1;
    } else if (t == Character.TYPE) {
      return 2;
    } else if (t == Short.TYPE) {
      return 2;
    } else if (t == Integer.TYPE) {
      return 4;
    } else if (t == Long.TYPE) {
      return 8;
    } else if (t == Float.TYPE) {
      return 4;
    } else if (t == Double.TYPE) {
      return 8;
    } else if (t == Void.TYPE) {
      return 0;
    } else {
      return REFERENCE_SIZE;
    }
  }
Returns -1 if it was not able to compute the size; otherwise returns the size.
Since unsafe.fieldOffset(Field) will give us the offset to the first byte of that field all we
need to do is find which of the non-static declared fields has the greatest offset.
geode-core/src/main/java/org/apache/geode/internal/size/ReflectionSingleObjectSizer.java