RFR: 8343188: Investigate ways to simplify MemorySegment::ofBuffer [v5]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Oct 31 22:43:27 UTC 2024
On Thu, 31 Oct 2024 19:06:16 GMT, ExE Boss <duke at openjdk.org> wrote:
> Because heap segments don’t have to be backed by an array.
I don't really know how to read this. We're asking a nio buffer to give us back a memory segment. There's two kinds of memory segment: heap segments and native segments (as the javadoc of memory segment clearly states). So, if `nativeSegment` is creating either a native segment (which can also be mapped), what does the other do, if not creating an heap segment?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21764#discussion_r1825253368
More information about the core-libs-dev
mailing list