RFR: 8139457: Array bases are aligned at HeapWord granularity [v19]
Roman Kennke
rkennke at openjdk.org
Mon Feb 13 17:57:37 UTC 2023
On Mon, 13 Feb 2023 16:15:56 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove stale method
>
> test/hotspot/jtreg/runtime/FieldLayout/ArrayBaseOffsets.java line 110:
>
>> 108: Asserts.assertEquals(unsafe.arrayBaseOffset(float[].class), intOffset, "Misplaced float array base");
>> 109: Asserts.assertEquals(unsafe.arrayBaseOffset(double[].class), longOffset, "Misplaced double array base");
>> 110: int expectedObjArrayOffset = (COOP || !Platform.is64bit()) ? intOffset : longOffset;
>
> `|| !Platform.is64Bit()` looks redundant, since `COOP` is guaranteed to be false on 32-bit?
No, because on 32 bit this expression becomes true, which is what we want - the small (int) offset for reference arrays.
-------------
PR: https://git.openjdk.org/jdk/pull/11044
More information about the hotspot-dev
mailing list