You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "AlanBateman (via GitHub)" <gi...@apache.org> on 2023/02/24 10:07:29 UTC

[GitHub] [spark] AlanBateman commented on pull request #39909: [SPARK-42369][CORE] Fix constructor for java.nio.DirectByteBuffer

AlanBateman commented on PR #39909:
URL: https://github.com/apache/spark/pull/39909#issuecomment-1443397556

   Would it be possible to provide a summary on what Spark is doing? It's untenable to rely on JDK internals like this as it could break at any time. In this case, I'm guessing that you want to create a ByteBuffer that is backed by some off-heap memory. The standard API for that is JNI NewDirectByteBuffer. Going forward, the j.l.foreign API might be what you want. In the current preview it can be done with a restricted method like `MemorySegment.ofAddress(address, size).asByteBuffer()`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org