fb64 commented on PR #1334: URL: https://github.com/apache/arrow-java/pull/1334#issuecomment-6193918795
Hi there, thanks again @jbonofre for the detailed review. I believe all your comments are now addressed, so here is a short summary in case it helps for another pass whenever you have time: - **Allocation:** buffers now use `malloc`/`free` through the foreign linker instead of one shared `Arena` per buffer (benchmarks in the [gist](https://gist.github.com/fb64/334d2eeb14e1e4c5adbff6e38e9f3b7e#file-results-md)). - **Accessor:** a single segment spanning the address space replaces the per-access segments, and `getByteBufferAddress` no longer duplicates the buffer. - **Negative sizes:** `allocate` throws `IllegalArgumentException`, like `Unsafe.allocateMemory`. - **Fallback:** `MemoryUtil` also catches `LinkageError`, so the FFM jar on a pre-22 JDK falls back to Unsafe, with tests in `TestMemoryUtilInferredFfmAccessorFallback`. One point is still open: the [BOM / release build](https://github.com/apache/arrow-java/pull/1334#discussion_r4192615824). I'm fine either way: remove `arrow-memory-ffm` from the BOM here and send the JDK 25 release-build change as a follow-up PR, or include that change in this PR. Just let me know what you prefer. Also, the workflows on the latest commit are waiting for approval to run. No rush, thanks for your time! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
