RFR: 8328112: Remove CardTable::_guard_region [v3]

Thomas Schatzl tschatzl at openjdk.org
Fri Mar 15 15:45:35 UTC 2024


On Fri, 15 Mar 2024 13:55:08 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> Hi all,
>> 
>> This patch removes the `CardTable::_guard_region`. Thanks for taking the time to review.
>> 
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Leave var  num_bytes.

Changes requested by tschatzl (Reviewer).

src/hotspot/share/gc/shared/cardTable.cpp line 81:

> 79: 
> 80:   // each card takes 1 byte
> 81:   size_t num_bytes = num_cards;

Instead of the comment, actually multiplying with the number of cards with the size of a `CardValue` seems preferable:
Suggestion:

  size_t num_bytes = num_cards * sizeof(CardValue);

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

PR Review: https://git.openjdk.org/jdk/pull/18324#pullrequestreview-1939272571
PR Review Comment: https://git.openjdk.org/jdk/pull/18324#discussion_r1526479727


More information about the hotspot-gc-dev mailing list