Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8281412

MemorySegment::map should live in FileChannel

XMLWordPrintable

      There are many dependencies between MemorySegment::map and FileChannel::map - they both require a MapMode, for instance. In addition, clients that want to create mapped memory regions might want to map the same file in multiple regions, in which case working on a FileChannel seems more convenient than working off a Path (which would require creating the channel twice, under the hood).

      For these reasons, the mapped memory segment factory should move as an instance method on FileChannel, and renamed to `mapAsMemorySegment`. Also some of the parameter names of the methods should be renamed to match those in FileChannel::map.

            jboes Julia Boes (Inactive)
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: