RFR (8u) Changed claim count to jint
Zhengyu Gu
zgu at redhat.com
Thu Oct 5 15:42:29 UTC 2017
Oops, pushed.
-Zhengyu
On 10/05/2017 11:41 AM, Aleksey Shipilev wrote:
> On 10/05/2017 05:33 PM, Zhengyu Gu wrote:
>> Changed claim counter from jlong to jint to avoid nasty Atomic::add(jlong, jlong*) bug, which
>> returns old value, instead of updated value (as comment stated).
>>
>> It is unlikely the number of regions can overflow max int, and avoid using jlong, in case of fixing
>> it in future release, that can break us again.
>>
>> http://cr.openjdk.java.net/~zgu/shenandoah/verf_count_jint/webrev.00/
>
> OK. Thanks for fixing this!
>
> I'd spell that idiomatically:
>
> assert(_heap->num_regions() < (size_t)max_jint, "Too many regions");
>
> -Aleksey
>
More information about the shenandoah-dev
mailing list