On Wed, 17 May 2023 22:08:57 GMT, Paul Sandoz <psan...@openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweak javadoc > > src/java.base/share/classes/java/lang/foreign/Linker.java line 219: > >> 217: * <ol> >> 218: * <li>the alignment constraint of {@code G} is set to its <a >> href="MemoryLayout.html#layout-align">natural alignment</a>;</li> >> 219: * <li>the size of {@code G} is a multiple of its alignment >> constraint;</li> > > Do you think this is a constraint that will hold across all linker > implementations? All "native linkers" as the text says. Other linkers (e.g. not for C) might obey other rules. These rules are basically constraining struct layouts to what can come out of a native compiler in the absence of pragma pack directives. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14037#discussion_r1197121074