RFR: 8324972: (bf) Make DirectByteBuffer.Deallocator idempotent [v4]
Alan Bateman
alanb at openjdk.org
Mon Feb 12 07:15:04 UTC 2024
On Sun, 11 Feb 2024 14:01:58 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:
> https://bugs.openjdk.org/browse/JDK-8316337 made a change advocating thread safety. That change had a flaw, incorrectly viewing Unsafe.freeMemory as idempotent, and as such is not thread safe, nor is it safe to multiple sequential invocation of the run method.
The comments added to JDK-8316337 aren't very clear. Would it be possible to outline the scenario that leads to the cleaning action be run more than once? I'm trying to see if there is a bug in the cleaner that explains this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17647#issuecomment-1938152288
More information about the nio-dev
mailing list