Withdrawn: 8316660: (fs) Files.lines implementation can use MemorySegment for file mapping

duke duke at openjdk.org
Mon Dec 18 21:51:51 UTC 2023


On Tue, 19 Sep 2023 08:52:29 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> This PR proposes using a `MemorySegment` instead of a `ByteBuffer` in the `Files::lines` implementation (in the internal class `FileChannelLinesSpliterator`).
> 
> The old solution deterministically unmapped the `ByteBuffer` if closed. If not closed, the `ByteBuffer` would be GC:ed.
> 
> This proposal mimics the old behavior but may hold the mapped memory region slightly longer.
> 
> Tested and passed tier1, tier2, tier3

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/15814


More information about the nio-dev mailing list