Skip to content
Permalink
Browse files
8259983: do not use uninitialized expand_ms value in G1CollectedHeap:…
…:expand_heap_after_young_collection

Reviewed-by: kbarrett, lucy
  • Loading branch information
MBaesken committed Jan 20, 2021
1 parent cf25383 commit 9f21bb6ac1b8ad08cbae0eee5209a1982a5ed00a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hotspot/share/gc/g1/g1CollectedHeap.cpp
@@ -2842,7 +2842,7 @@ void G1CollectedHeap::expand_heap_after_young_collection(){
if (expand_bytes > 0) {
// No need for an ergo logging here,
// expansion_amount() does this when it returns a value > 0.
double expand_ms;
double expand_ms = 0.0;
if (!expand(expand_bytes, _workers, &expand_ms)) {
// We failed to expand the heap. Cannot do anything about it.
}

1 comment on commit 9f21bb6

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 9f21bb6 Jan 20, 2021

Please sign in to comment.