[foreign-memaccess] RFR: 8246052: MemorySegment::mapFromPath should take an offset
Chris Hegarty
chegar at openjdk.java.net
Thu May 28 14:43:39 UTC 2020
On Thu, 28 May 2020 13:10:15 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This patch adds a mapping offset to MemorySegment::mapFromPath. This usability enhancement has been requested many
> times, and it would be nice to add it to the API, to make it more similar to FileChannel::map, and to allow for more
> efficient memory usage when dealing with mapped files. I also added more tests on mapped segments, to check for edge
> cases; and also to verify that mapping from offset actually works.
A nice usability enhancement. Looks good to me.
-------------
Marked as reviewed by chegar (no project role).
PR: https://git.openjdk.java.net/panama-foreign/pull/187
More information about the panama-dev
mailing list