RFR: 8324972: (bf) Make DirectByteBuffer.Deallocator idempotent [v2]

Per Minborg pminborg at openjdk.org
Wed Jan 31 09:50:57 UTC 2024


> This PR proposes to make deallocators and unmappers for memory regions idempotent. This is to prevent (likely very rare) duplicate invocations. 
> 
> There are no unit tests but it should be noted that the idempotent behavior (now correct) is similar to the  intended behavior before cf74b8c2a32f33019a13ce80b6667da502cc6722 but where idempotency was not guaranteed in a multi-threaded environment.
> 
> Passes tier1, 2, and 3 tests.

Per Minborg has updated the pull request incrementally with one additional commit since the last revision:

  Refrain from using AtomicBoolean

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17647/files
  - new: https://git.openjdk.org/jdk/pull/17647/files/f735bc9d..3177c1ed

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17647&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17647&range=00-01

  Stats: 18 lines in 1 file changed: 13 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/17647.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17647/head:pull/17647

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


More information about the nio-dev mailing list