RFR: JDK-8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection

Lutz Schmidt lucy at openjdk.java.net
Tue Jan 19 22:28:38 UTC 2021


On Tue, 19 Jan 2021 15:37:10 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Currently we could run into an uninitialized value of expand_ms in G1CollectedHeap::expand_heap_after_young_collection() .
> This would happen in case of an early return of bool G1CollectedHeap::expand(size_t expand_bytes, WorkGang* pretouch_workers, double* expand_time_ms) . See  the special case in expand 
> 
>   if (is_maximal_no_gc()) {
>     log_debug(gc, ergo, heap)("Did not expand the heap (heap already fully expanded)");
>     return false;
>   }

Looks good to me. Isn't that complicated either. :-)

-------------

Marked as reviewed by lucy (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2148



More information about the hotspot-gc-dev mailing list