RFR: 8312132: Add tracking of multiple address spaces in NMT [v34]

Johan Sjölen jsjolen at openjdk.org
Tue Apr 30 10:06:10 UTC 2024


On Tue, 30 Apr 2024 08:19:47 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Yeah sure, but now you get collisions if you merge two trees together that both have had nodes added before the merge. Because both Treaps will have followed the same rng sequence - after all, AFAICS your seed is always the same.

Alright, yeah, that's a problem if we make that a supported API. `os::random` for each `Treap` constructor and then saving that as the initial seed seems reasonable to me and like a clear improvement.

>I also think you do not need the seed constructor argument if you do that.

That's true, it might be nice to have a seed constructor argument if you want reproducible tests for example.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1584488347


More information about the hotspot-dev mailing list