On Wed, 1 Nov 2023 09:52:24 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:

>> src/hotspot/share/nmt/memMapPrinter.cpp line 99:
>> 
>>> 97:   }
>>> 98: 
>>> 99:   bool add(const void* from, const void* to, MEMFLAGS f) {
>> 
>> Please mention that we're `add`ing in sorted order, that is that `forall R 
>> \in _ranges: R.to <= from` holds.
>
> I wasn't sure about that. Do we always? Are NMT regions guaranteed to be 
> sorted? (Dimly remember cases where that weren't so)

It's always sorted in some way, we save the linked lists in some different 
sorting orders for baselining, but in the `VirtualMemoryTracker` they're 
guaranteed to be sorted by address.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16301#discussion_r1378609954

Reply via email to