[foreign-preview] RFR: 8281412: MemorySegment::map should live in FileChannel
Julia Boes
jboes at openjdk.java.net
Thu Mar 10 14:11:44 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.
-------------
Commit messages:
- 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=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8281412
Stats: 465 lines in 10 files changed: 308 ins; 110 del; 47 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