RFR: 8366456: Allow AllocFailStrategy for RBTree

Casper Norrbin cnorrbin at openjdk.org
Mon Sep 1 08:45:41 UTC 2025


On Fri, 29 Aug 2025 19:17:58 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Right now the RBTree forces you to use the intrusive tree if you want fine-grained control of the out-of-memory strategy of the node allocations. We can change this to be a bit more flexible.
> 
> One of the tests were incorrectly indented, so I fixed that. I also changed from `typedef` to `using`, turns out that `typedef` can give strange errors when the template instantiation is incorrect[0].
> 
> [0] For my particular gcc

Thank you for this. Would make the tree more flexible to use.

This comment at the top needs to be edited/removed since we can now handle allocations failing. Looks good otherwise!
https://github.com/openjdk/jdk/blob/fe4c7a0429a2cf9ef47701d68d0852ce44e1a9ab/src/hotspot/share/utilities/rbTree.hpp#L64

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

PR Review: https://git.openjdk.org/jdk/pull/27011#pullrequestreview-3172706368


More information about the hotspot-dev mailing list