RFR: 8346920: Serial: Support allocation in old generation when heap is almost full [v2]

Albert Mingkun Yang ayang at openjdk.org
Fri Jan 24 11:18:54 UTC 2025


On Fri, 24 Jan 2025 09:04:24 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/share/gc/serial/serialHeap.hpp line 103:
> 
>> 101:   // will attempt some uncommon measures, e.g. alllocating small objs in
>> 102:   // old-gen.
>> 103:   bool _is_heap_almost_full;
> 
> I'm not to fond of the `heap` part of the name since it lives in `SerialHeap`, but just calling it `_is_almost_full` will look strange since we also have the parameter `full` where it is used. 
> 
> What do you think about calling it something like `_allow_old_gen_allocation` instead?

This field is meant to convey what the situation is, and how to handle this situation is decided in callers with some context.

Naming it `_allow_old_gen_allocation` would mix up what it is and what to do with that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23270#discussion_r1928525148


More information about the hotspot-gc-dev mailing list