On Fri, 12 Dec 2025 09:52:50 GMT, Joel Sikström <[email protected]> wrote:
>> Yes, I agree, we overlooked that we had that information inside `do_addr`.
>
> The remaining_words here are the remaining words in the "from"/"source"
> region, while the `words_remaining()` inside `do_addr` are the words
> remaining in the "to"/"destination" region. We could rename remaining_words
> to something like `from_words_remaining`?
>
> The reason we can't handle this in `do_addr` is because obj_size can be
> larger than the words we have remaining in the from region.
Ahh. Thanks for the explanation.
I wonder if you could get rid of the confusion if you changed the code to be:
markWord mark = safe_mark_prototype(cur_addr, end_addr);
And performed the calculation hidden iside the safe_mark_protype?
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/1785#discussion_r2613656897