GitHub user chaokunyang added a comment to the discussion: How does the zero copy works ?
Hi @Reef3rm4n , `List<MemoryBuffer> buffers = bufferObjects.stream().map(BufferObject::toBuffer).collect(Collectors.toList());` are just an example. In your production case, you should not invoke such methods. You should invoke `org.apache.fury.serializer.BufferObject#writeTo` to write the data into the memory address you provided. For example, you can allocate a buffer from shared off heap memory, then you wrap that buffer into fury MemoryBuffer by `MemoryUtils.buffer(long, int)`. Then you can invoke `BufferObject#writeTo` too write the data into shared memory directly. GitHub link: https://github.com/apache/fury/discussions/1377#discussioncomment-10278487 ---- This is an automatically sent email for commits@fury.apache.org. To unsubscribe, please send an email to: commits-unsubscr...@fury.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org For additional commands, e-mail: commits-h...@fury.apache.org