RFR: Add generations to freeset [v8]

Y. Srinivas Ramakrishna ysr at openjdk.org
Thu Apr 20 19:51:37 UTC 2023


On Thu, 20 Apr 2023 19:05:45 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 125:
>> 
>>> 123: 
>>> 124: 
>>> 125: HeapWord* ShenandoahFreeSet::allocate_old_with_affiliation(ShenandoahAffiliation affiliation,
>> 
>> Will `affiliation` always be `old` here? Should we remove this parameter?
>
> Affiliation might be FREE.  First, we try to allocate from within an old-collector-region that is_old().  If that fails, we'll try to allocate from an old_collector_region that is not afilliated.

I think the .hpp file declaration documents the intent here:


  // Satisfy allocation request req by finding memory that matches affiliation, which either equals req.affiliation
  // or FREE. We know req.is_old().


So I think you are right that this interface can probably be simplified and cleaned up (or abstracted and consolidated).

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/250#discussion_r1173004039


More information about the shenandoah-dev mailing list