On Wed, 5 Apr 2023 20:40:32 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/CABI.java line 48: >> >>> 46: // might be running in a 32-bit VM on a 64-bit platform. >>> 47: // addressSize will be correctly 32 >>> 48: if (Architecture.isX64() && ADDRESS_SIZE == 64) { >> >> Is there a difference to Architecture.is64bit (I.e. is the later or the >> former runtime vs compiletime > > 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1159032441