RFR: 8286189 G1: Change "wasted" memory to "unused" memory in reporting

Albert Mingkun Yang ayang at openjdk.java.net
Thu May 5 20:33:48 UTC 2022


On Thu, 5 May 2022 13:32:20 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this change of the term "wasted" to "unused" in memory reporting; "wasted" is a bit ambiguous, meaning memory that can't be used because it's blocked by something external (like the space at the end of humongous regions where gc needs to wait until the humongous objects is freed by the application).
> 
> Testing: gha
> 
> Thanks,
>   Thomas

Minor comment.

src/hotspot/share/gc/g1/g1SegmentedArray.hpp line 218:

> 216:                                                   // get new segments from.
> 217: 
> 218:   volatile uint _num_available_slots; // Number of slots available in all segments (allocated + not yet used).

I wonder if `_num_total_slots` is better; "available" seems to suggest a slot that can be "used" when a request comes in.

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

Marked as reviewed by ayang (Reviewer).

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



More information about the hotspot-gc-dev mailing list