RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator)
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Mon Nov 2 11:11:56 UTC 2020
On Sun, 1 Nov 2020 16:06:32 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> Now that MemorySegment is AutoCloseable then maybe the term "alive" should be replaced with "open" or "closed" and isAlive replaced with isOpen is isClosed.
While the reason for the method being called "isAlive" are mostly historical (the old Panama pointer API had such a method), I think I still stand behind the current naming scheme. For temporal bounds, I think "isAlive" works better than "isOpened".
> MappedMemorySegments. The force method specifies a write back guarantee but at the same time, the implNote in the class description suggests that the methods might be a no-op. You might want to adjust the wording to avoid any suggestion that force might be a no-op.
The comment that this operation could be no-op was borrowed from the `MappedByteBuffer` API; looking at the impl, it seems that you are right that, under no circumstances (unless the segment has length zero) this should be a no-op. How do you suggest I proceed?
-------------
PR: https://git.openjdk.java.net/jdk/pull/548
More information about the hotspot-dev
mailing list