RFR: 8331609: GenShen: Refactor generational mode allocations [v2]
William Kemper
wkemper at openjdk.org
Tue May 7 21:40:06 UTC 2024
On Mon, 6 May 2024 20:43:33 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> How do we know this is NOT a shared allocation evacuation request?
We check if the request type is `ShenandoahAllocRequest::_alloc_plab` on line 239.
> So what if req is not promotion? wouldn't we want to confirm that get_evacuation_reserve() > requested_bytes?
[The previous version of this code](https://github.com/openjdk/shenandoah/pull/427/files#diff-5ca0a05384b7b2604dd3c9b55d91a7010a42cd0ba246600c844e19821bd6b60bL1178) had a comment for this case (i.e., shared evacuation) that read:
// This is a shared allocation for evacuation. Memory has already been reserved for this purpose.
https://github.com/openjdk/shenandoah/pull/427/files#diff-5ca0a05384b7b2604dd3c9b55d91a7010a42cd0ba246600c844e19821bd6b60bL1178
I believe this change preserves the original behavior, but it makes sense to me to also enforce evacuation reserve constraints for `shared` evacuations.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/427#discussion_r1593131282
More information about the shenandoah-dev
mailing list