[Integrated] [foreign-memaccess] RFR: 8246052: MemorySegment::mapFromPath should take an offset

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu May 28 14:53:33 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.

This pull request has now been integrated.

Changeset: 648b843f
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/648b843f
Stats:     82 lines in 3 files changed: 0 ins; 59 del; 23 mod

8246052: MemorySegment::mapFromPath should take an offset

Reviewed-by: sundar, chegar

-------------

PR: https://git.openjdk.java.net/panama-foreign/pull/187


More information about the panama-dev mailing list