On Wed, 5 Apr 2023 21:18:43 GMT, Glavo <d...@openjdk.org> wrote:

>> There should be no difference; I was hesitant to drop the ADDRESS_SIZE check 
>> without knowing more about the foreign api dependencies.  ADDRESS_SIZE is 
>> computed (I think) from `UNSAFE.ADDRESS_SIZE * 8`.
>> But I can't think of how it can be different than the CPU_BITS that are 
>> defined when the JDK is built.
>
>> Is there a difference to Architecture.is64bit (I.e. is the later or the 
>> former runtime vs compiletime
> 
> Theoretically, the two can be unrelated. Linux x32 ABI is a typical example 
> of using 32-bit addresses on the x86-64 architecture.

Right, it is still possible to run a 32-bit VM build on a 64-bit platform. 
`os.arch` is the runtime platform in this case, but the VM variant can still be 
32 bits.

Since `Architecture.isX64` seems to be the target arch of the VM, I'm think 
that when running a 32-bit VM on a amd64 would result in `isX64` being `false`? 
(In that case, only the `isX64` check should be enough)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1159142830

Reply via email to