RFR: Avoid using uintx in ShenandoahHeapRegion
Aleksey Shipilev
shade at redhat.com
Thu Aug 23 09:11:26 UTC 2018
This is a proper solution for platforms where size_t != uintx.
Testing: tier1_gc_shenandoah
diff -r 8cb652cfde2c src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp Thu Aug 23 10:42:40 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp Thu Aug 23 11:10:25 2018 +0200
@@ -570,5 +570,5 @@
}
- uintx region_size;
+ size_t region_size;
if (FLAG_IS_DEFAULT(ShenandoahHeapRegionSize)) {
if (ShenandoahMinRegionSize > initial_heap_size / MIN_NUM_REGIONS) {
@@ -638,5 +638,5 @@
// 2. This means that region_size is the largest power of 2 that's
// <= what we've calculated so far.
- region_size = ((uintx)1 << region_size_log);
+ region_size = (1u << region_size_log);
// Now, set up the globals.
@@ -648,5 +648,5 @@
guarantee(RegionSizeBytes == 0, "we should only set it once");
- RegionSizeBytes = (size_t)region_size;
+ RegionSizeBytes = region_size;
RegionSizeWords = RegionSizeBytes >> LogHeapWordSize;
assert (RegionSizeWords*HeapWordSize == RegionSizeBytes, "sanity");
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list