RFR: 8328112: Remove CardTable::_guard_region [v3]
Thomas Schatzl
tschatzl at openjdk.org
Sat Mar 16 22:18:08 UTC 2024
On Fri, 15 Mar 2024 15:48:34 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> 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);
>
> Does the comment `each card takes 1 byte` need to be adjusted?
just remove it imo. The code makes it clear that we calculate cards * sizeof(card) here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18324#discussion_r1526785720
More information about the hotspot-gc-dev
mailing list