On Mon, 7 Oct 2024 08:49:58 GMT, Stefan Karlsson <[email protected]> wrote:
>> Style note: The added code is inserted between a comment and the code that
>> the comment refers to. It would be nice to tidy this up.
>
> Did you figure out if the code above is correct w.r.t.
> `MinObjectAlignment=16`?
When MinObjectAlignment=16, then that method does nothing anyway:
if (MinObjAlignment > 1) {
return;
}
I think what it really means to say is
if (MinObjAlignment >= CollectedHeap::min_fill_size()) {
return;
}
That's also what the comment says: "The size of the gap (if any) right before
dense-prefix-end is MinObjAlignment. Need to fill in the gap only if it's
smaller than min-obj-size, and the filler obj will extend to next region."
If I interpret that correctly, we need to deal with the situation only when
MinObjAlignment < min_fill_size, because the filler object would extend to the
next region, and we need to adjust the next region and mark-bitmap for that
extra word. @albertnetymk might want to confirm.
I'll move the if (UCOH) block down a little bit to right before if
(MinObjAlignment) block.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1789983561