RFR: Remove obsolete check in FreeSet::allocate

Roman Kennke rkennke at redhat.com
Thu Mar 29 14:38:20 UTC 2018


Am 29.03.2018 um 16:10 schrieb Aleksey Shipilev:
> There is an obsolete check in FreeSet::allocate, that stopped being relevant after we did allocation
> bitmaps. There is no "current_index" to trust now.
> 
> diff -r 2416e01eb9b9 src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp	Thu Mar 29 14:25:47 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp	Thu Mar 29 16:08:58 2018 +0200
> @@ -428,11 +428,6 @@
>    assert_heaplock_owned_by_current_thread();
>    assert_bounds();
> 
> -  // Not enough memory in free region set. Coming out of full GC, it is possible that
> -  // there are no free regions available, so current_index may be invalid. Have to
> -  // poll capacity as the precaution here.
> -  if (word_size * HeapWordSize > capacity()) return NULL;
> -
>    if (word_size > ShenandoahHeapRegion::humongous_threshold_words()) {
>      switch (type) {
>        case ShenandoahHeap::_alloc_shared:
> 
> Testing: hotspot_gc_shenandoah
> 
> Thanks,
> -Aleksey
> 

Yes, looks good. Thank you!

Roman



More information about the shenandoah-dev mailing list