RFR: 8139457: Array bases are aligned at HeapWord granularity [v11]

Aleksey Shipilev shade at openjdk.org
Tue Jan 24 18:34:27 UTC 2023


On Thu, 19 Jan 2023 13:29:13 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> I think that heap_word_size() aligns up:
>> inline size_t heap_word_size(size_t byte_size) {
>>   return (byte_size + (HeapWordSize-1)) >> LogHeapWordSize;
>> }
>> which makes obj_memory_range() ok as it is? I agree that it is not great, but it seems to be used only by check_for_bad_heap_word_value(), and for that purpose it is ok? Not 100% sure.
>
> You are right that it aligns up. I agree that it's not 100% clear that check_for_bad_heap_word_value is correct.

Similar thing applies to `filler_array_min_size` hunk above? Although there it is masked by "larger" `align_object_size`.

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

PR: https://git.openjdk.org/jdk/pull/11044


More information about the hotspot-dev mailing list