RFR: 8345314: Add a red–black tree as a utility data structure [v15]

Casper Norrbin cnorrbin at openjdk.org
Fri Jan 24 11:23:52 UTC 2025


On Thu, 23 Jan 2025 17:57:04 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> Casper Norrbin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   treap swap fix
>
> Hmm, I still can't compile it, I see:
> 
> 
> /Users/gerard/Work/bugs/8317453/jdk/src/hotspot/share/nmt/vmatree.cpp:235:18: error: expected ';' after expression
>   235 |   VMATreap::Range range(nullptr, nullptr);
>       |                  ^
>       |                  ;
> /Users/gerard/Work/bugs/8317453/jdk/src/hotspot/share/nmt/vmatree.cpp:235:13: error: no member named 'Range' in 'RBTree<unsigned long, VMATree::IntervalChange, VMATree::PositionComparator, RBTreeCHeapAllocator<MemTag::mtNMT>>'
>   235 |   VMATreap::Range range(nullptr, nullptr);
>       |   ~~~~~~~~~~^
> /Users/gerard/Work/bugs/8317453/jdk/src/hotspot/share/nmt/vmatree.cpp:235:19: error: use of undeclared identifier 'range'
>   235 |   VMATreap::Range range(nullptr, nullptr);
>       |                   ^
> /Users/gerard/Work/bugs/8317453/jdk/src/hotspot/share/nmt/vmatree.cpp:240:5: error: use of undeclared identifier 'range'
>   240 |     range = _tree.find_enclosing_range(from);
>       |     ^
> /Users/gerard/Work/bugs/8317453/jdk/src/hotspot/share/nmt/vmatree.cpp:240:19: error: no member named 'find_enclosing_range' in 'RBTree<unsigned long, VMATree::IntervalChange, VMATree::PositionComparator, RBTreeCHeapAllocator<MemTag::mtNMT>>'
>   240 |     range = _tree.find_enclosing_range(from);
>       |             ~~~~~ ^
> /Users/gerard/Work/bugs/8317453/jdk/src/hotspot/share/nmt/vmatree.cpp:241:10: error: use of undeclared identifier 'range'
>   241 |     if ((range.start == nullptr && range.end == nullptr) ||
>       |          ^

@gerard-ziemski That one is on me! I still had an old copy of VMATree that didn't have `find_enclosing range`. I've added it now and tested with the latest version, so hopefully there should not be any more issues.

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

PR Comment: https://git.openjdk.org/jdk/pull/22360#issuecomment-2612285325


More information about the hotspot-dev mailing list