RFR (XS): Heap alignment should agree with ShenandoahMaxRegionSize

Aleksey Shipilev shade at redhat.com
Fri Mar 3 16:15:04 UTC 2017


Tried to use 1G regions with 4T heap, and fastdebug failed with

#  assert((((size_t) _first_region_bottom) &
(ShenandoahHeapRegion::RegionSizeBytes - 1)) == 0) failed: misaligned heap:

This is because CollectedHeap::conservative_heap_alignment() returns 32M, not
the value overridden from the command line! And, we poll the value from G1, not
from our own ShenandoahHeapRegion! Remarkably, in 8u, we return

This is the fix for 9:

Moved both constants close to verification code that their only use. Will commit
a part of this patch to 8u that does the same.

Testing: hotspot_gc_shenandoah (9/8u), 1G regions with 4T heap startup :)


More information about the shenandoah-dev mailing list