On Thu, 14 Nov 2024 11:50:31 GMT, Oli Gillespie <ogilles...@openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Reimplement with segmented linked list of arrays > > src/java.base/share/classes/jdk/internal/ref/CleanerImpl.java line 310: > >> 308: Node newHead = head.next; >> 309: newHead.prev = null; >> 310: head = newHead; > > Does this allow removing the final head node when the list is empty? Seems we > need to avoid that (`if (head.size == 0 && head.next != null)`?. Good spot. Fixed it exactly like that. Managed to create a direct unit test that captures it, among other things. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22043#discussion_r1842209760