Skip to content

Commit 9f21bb6

Browse files
committed
8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection
Reviewed-by: kbarrett, lucy
1 parent cf25383 commit 9f21bb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,7 @@ void G1CollectedHeap::expand_heap_after_young_collection(){
28422842
if (expand_bytes > 0) {
28432843
// No need for an ergo logging here,
28442844
// expansion_amount() does this when it returns a value > 0.
2845-
double expand_ms;
2845+
double expand_ms = 0.0;
28462846
if (!expand(expand_bytes, _workers, &expand_ms)) {
28472847
// We failed to expand the heap. Cannot do anything about it.
28482848
}

0 commit comments

Comments
 (0)