public static int getNextFieldOffset(Class<?> clazz) {
        Field lastField = null;
        int lastFieldOffset = 0;
        long offset;
        for (Field field : clazz.getDeclaredFields()) {
            if (!Modifier.isStatic(field.getModifiers())) {
                offset = UNSAFE.objectFieldOffset(field);
                if (lastFieldOffset < offset) {
                    lastField = field;
                    lastFieldOffset = (int) offset;
                }
            }
        }
        if (lastField == null) {
            return 0;
        }
        int size = getSize(lastField.getDeclaringClass());
        return lastFieldOffset + size;
    }
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