public static int getSize(Class<?> clazz) {
        if (Object.class.isAssignableFrom(clazz)) {
            return UNSAFE.addressSize();
        } else if (byte.class == clazz) {
            return Byte.BYTES;
        } else if (short.class == clazz) {
            return Short.BYTES;
        } else if (int.class == clazz) {
            return Integer.BYTES;
        } else if (long.class == clazz) {
            return Long.BYTES;
        } else if (float.class == clazz) {
            return Float.BYTES;
        } else if (double.class == clazz) {
            return Double.BYTES;
        } else if (char.class == clazz) {
            return Character.BYTES;
        } else if (boolean.class == clazz) {
            return Byte.BYTES;
        } else {
            throw new IncompatibleJvmException(
                    "The class must be the Object class, or a primitive class, but got: "
                            + clazz.getName());
        }
    }
Though {@link jdk.internal.misc.Unsafe} is more powerful, we don't want to "add-exports"
everywhere, which causes a bad development experience
turms-server-common/src/main/java/im/turms/server/common/infra/unsafe/UnsafeUtil.java