RFR: 8345314: Add a red–black tree as a utility data structure [v11]
Johan Sjölen
jsjolen at openjdk.org
Fri Jan 10 10:03:22 UTC 2025
On Fri, 10 Jan 2025 09:56:50 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:
>> src/hotspot/share/utilities/rbTree.hpp line 42:
>>
>>> 40: // Key needs to be of a type that is trivially destructible.
>>> 41: // The tree will call a value's destructor when its node is removed.
>>> 42: // Nodes are address stable and will not change during its lifetime unless modified by the user.
>>
>> How would a node's address be modified by the user? The address never changes!
>
> Removed the last part. I was trying to say that the content of a node never changes (unlike previously) unless the user explicitly changes the value.
Yeah, I think that can be more confusing than not mentioning it :).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22360#discussion_r1910125824
More information about the hotspot-dev
mailing list