--- a/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp Thu Sep 05 08:26:44 2019 +0200
+++ b/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp Thu Sep 05 08:26:49 2019 +0200
@@ -63,7 +63,7 @@
jint ParallelScavengeHeap::initialize() {
const size_t reserved_heap_size = ParallelArguments::heap_reserved_size_bytes();
- ReservedSpace heap_rs = Universe::reserve_heap(reserved_heap_size, HeapAlignment);
+ ReservedHeapSpace heap_rs = Universe::reserve_heap(reserved_heap_size, HeapAlignment);
os::trace_page_sizes("Heap",
MinHeapSize,
@@ -72,9 +72,9 @@
heap_rs.base(),
heap_rs.size());
- initialize_reserved_region((HeapWord*)heap_rs.base(), (HeapWord*)(heap_rs.base() + heap_rs.size()));
+ initialize_reserved_region(heap_rs);
- PSCardTable* card_table = new PSCardTable(reserved_region());
+ PSCardTable* card_table = new PSCardTable(heap_rs.region());
card_table->initialize();
CardTableBarrierSet* const barrier_set = new CardTableBarrierSet(card_table);
barrier_set->initialize();