RFR: 8331609: GenShen: Refactor generational mode allocations [v4]

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri May 10 00:31:17 UTC 2024


On Thu, 9 May 2024 22:34:33 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Done
>
> Why not call it `bool can_allocate(size_t bytes)` and expend with the need for the comment to resolve the reader's confusion from the naming?
> 
> 
>   // Check if there is space available to accommodate the allocation.
>   if (can_allocate(requested_bytes)) {
>     // the allocation might still fail because of alignment constraints
>     // or because of fragmentation of available space.
>     return true;
>   }

I'd similarly adjust subsequent comments to not mention promotion specifically, but just call it `allocation_reserve` and `allocation`, instead of `promotion_reserve` and `promotion`.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/427#discussion_r1596110578


More information about the shenandoah-dev mailing list