Skip to content

Commit 4ae39b1

Browse files
author
Hamlin Li
committed
8260208: Improve dummy object filling condition in G1CollectedHeap::fill_archive_regions in cds
Reviewed-by: tschatzl, iklam
1 parent c52c6c6 commit 4ae39b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,8 @@ void G1CollectedHeap::fill_archive_regions(MemRegion* ranges, size_t count) {
705705
// Fill the memory below the allocated range with dummy object(s),
706706
// if the region bottom does not match the range start, or if the previous
707707
// range ended within the same G1 region, and there is a gap.
708-
if (start_address != bottom_address) {
708+
assert(start_address >= bottom_address, "bottom address should not be greater than start address");
709+
if (start_address > bottom_address) {
709710
size_t fill_size = pointer_delta(start_address, bottom_address);
710711
G1CollectedHeap::fill_with_objects(bottom_address, fill_size);
711712
increase_used(fill_size * HeapWordSize);

0 commit comments

Comments
 (0)