public static void free(ByteBuffer buffer) {
        if (buffer.isDirect()) {
            Cleaner cleaner = ((DirectBuffer) buffer).cleaner();
            if (cleaner != null) {
                cleaner.clean();
            }
        }
    }
Allocate direct memory with cap len.
All DirectByteBuffer in this project should be allocated from this method.
indexr-common/src/main/java/io/indexr/util/ByteBufferUtil.java