RFR: [6904367]: (coll) IdentityHashMap is resized before exceeding the expected maximum size

Peter Levart peter.levart at gmail.com
Tue Jul 8 10:12:30 UTC 2014


On 07/08/2014 09:33 AM, Martin Buchholz wrote:
> I've updated the webrev
> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/IdentityHashMap-capacity/
> It now has all my TODOs done.
> The test case has been testng-ified.

Hi Martin,

What happened to the desire that when OOME is thrown on resizing, IHM is 
left unchanged?

Regards, Peter

>
> On Mon, Jul 7, 2014 at 6:54 PM, Ivan Gerasimov <ivan.gerasimov at oracle.com>
> wrote:
>
>> Unfortunately, x + x << 1 causes the same overflow bug as 3*x:
>>
> x + (x << 1) is merely supposed to be possibly more efficient than 3*x.
>
>
>> (int)(1431655766 + 1431655766 << 1) == 2
>>
> OK, I think my latest version doesn't have any overflow bugs.




More information about the core-libs-dev mailing list