RFR: 8368740: Serial: Swap eden and survivor spaces position in young generation
Francesco Andreuzzi
fandreuzzi at openjdk.org
Fri Sep 26 09:24:11 UTC 2025
On Fri, 26 Sep 2025 09:13:00 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/gc/serial/defNewGeneration.cpp line 345:
>>
>>> 343:
>>> 344: MemRegion eden_mr{eden()->bottom(), (HeapWord*)_virtual_space.high()};
>>> 345: eden()->initialize(eden_mr, eden()->is_empty(), SpaceDecorator::Mangle);
>>
>> `eden()->is_empty()` should always be `false` after expansion, since `delta_bytes > 0`, right? Could be an assertion
>
>> eden()->is_empty() should always be false after expansion, since delta_bytes > 0
>
> I don't get it; it's possible that eden is NOT empty and we expands it to satisfy pending alloc-request.
What I'm asking is: is it possible that `eden()->is_empty()` is `false` in L345?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27513#discussion_r2381582170
More information about the hotspot-gc-dev
mailing list