RFR: 8312132: Add tracking of multiple address spaces in NMT [v89]
Johan Sjölen
jsjolen at openjdk.org
Fri May 17 11:27:21 UTC 2024
On Fri, 17 May 2024 08:45:49 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> The depth of a binary tree is on the order of `log(n)`, "the order of" is important here. Essentially, we need some wiggle room. I found that 3 fails, so I bumped it to 5. This did cause me to investigate whether we can pick a tighter bound, and `3.5` fits as long as we perform `ceil` instead of `floor` on the result.
>>
>> I'll comment where the constant comes from.
>
> This made me a bit curious about other trees bounds. An RB-tree has a bound of `2log_2(N + 1)`, so I decided to find the bound for our treap in base-2 log. Turns out we're at `2.5*log_2(N + 1)`, so very close to the RB-tree.
># assert(maximum_depth_found <= ceil(expected_maximum_depth)) failed: depth unexpectedly large, was: 57, expected: 56
Apparently there's a very small chance of it being worse than that :-). I'll adjust the expectations here a bit more.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1604815042
More information about the hotspot-dev
mailing list