[foreign-preview] RFR: 8281412: MemorySegment::map should live in FileChannel [v2]

Julia Boes jboes at openjdk.java.net
Thu Mar 10 14:48:28 UTC 2022


> This change moves the factory for mapped memory segments to `FileChannel`, as a new instance method `map`, which moves it closer to the existing `FileChannel::map` that returns a `MappedByteBuffer`.  
> 
> Tests are adjusted accordingly and a new test for custom file channels (that do/don't override the method) is added.

Julia Boes has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:

 - Merge branch 'foreign-preview' into filechannel-mapAsMemorySegment
 - let caller close the file channel
 - update docs and tests and add custom file channel test

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

Changes: https://git.openjdk.java.net/panama-foreign/pull/668/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=668&range=01
  Stats: 472 lines in 10 files changed: 311 ins; 111 del; 50 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/668.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/668/head:pull/668

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


More information about the panama-dev mailing list