RFR: 8345181: (ch) Windows asynchronous channels may return temporary direct buffers to the buffer cache twice (win)

Michael McMahon michaelm at openjdk.org
Wed Dec 4 20:42:39 UTC 2024


On Wed, 4 Dec 2024 18:36:40 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Due to operations on different threads, the Windows asynchronous channels might try to return the same buffer to the temporary direct buffer cache twice resulting in an attempt to free the same address more than once. This was not a problem before #22339 was integrated, as previously a cleaner had been used to free temporary buffers, and the cleaner did not permit duplicative freeing of the same memory. This change introduces checks in the Windows asynchronous channels to prevent duplicative returns of a buffer to the cache.

Seems pretty straightforward. Looks fine.

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

Marked as reviewed by michaelm (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22554#pullrequestreview-2479856443


More information about the nio-dev mailing list