RFR: 8345314: Add a red–black tree as a utility data structure [v12]
Thomas Stuefe
stuefe at openjdk.org
Mon Jan 13 07:35:42 UTC 2025
On Sun, 12 Jan 2025 09:08:46 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Thinking about this some more, the fact that tree nodes are allocated internally and are separate entities from the key/value holders precludes the using this tree for memory management (address stable or not). It works, but the separate allocation defeats the purpose. It would be good if, on `upsert`, I could hand in optionally the future node memory itself, and the node should then be placed into/at the start of this memory. And it must be able to deal with the handed-in node memory be variable-sized, of course.
Or, much simpler, let me construct the node itself and hand it into the tree.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22360#issuecomment-2586392855
More information about the hotspot-dev
mailing list