MemorySegment.mapFromPath vs FileChannel.map
Philippe Marschall
kustos at gmx.net
Fri Apr 24 08:21:04 UTC 2020
Hello
I noted a difference between MemorySegment.mapFromPath and
FileChannel.map. MemorySegment.mapFromPath only allows to specify a
length but not an offset. Is this intentional or an oversight? Only
having the ability to map a subsgement from the start of the file seems
strange. Especially given that FileChannelImpl.mapInternal already
offers an offset.
Also the FileChannel methods use the map mode as the first argument
whereas MemorySegment uses it as the last.
Cheers
Philippe
More information about the panama-dev
mailing list