static long sizeof(Class<?> clazz, boolean roundResult, Unsafe myUnsafe) {
    Assert.assertTrue(!clazz.isArray());
    long size = unsafeSizeof(clazz, myUnsafe);
    if (size == -1) {
      size = safeSizeof(clazz);
    }
    if (roundResult) {
      size = roundUpSize(size);
    }
    return size;
  }
Figure out the size of an object using reflection. This class does not follow any object
references, it just calculates the size of a flat object.
geode-core/src/main/java/org/apache/geode/internal/size/ReflectionSingleObjectSizer.java