code: public static ByteBuf wrappedBuffer(long memoryAddress, int size, boolean doFree) {
          return new WrappedUnpooledUnsafeDirectByteBuf(ALLOC, memoryAddress, size, doFree);
      }
docs: Creates a new buffer which wraps the specified memory address. If {@code doFree} is true the
  memoryAddress will automatically be freed once the reference count of the {@link ByteBuf} reaches {@code 0}.