Oredering of fields in inline types and records
forax at univ-mlv.fr
Fri Mar 6 17:00:40 UTC 2020
----- Mail original -----
> De: "Stephen Colebourne" <scolebourne at joda.org>
> À: "valhalla-dev" <valhalla-dev at openjdk.java.net>
> Envoyé: Vendredi 6 Mars 2020 17:53:37
> Objet: Oredering of fields in inline types and records
> In a normal class with multiple fields, my understanding is that the
> JVM is free to layout the fields in memory however it wishes,
> potentially to make them better align with the underlying
> architecture. ie. it is not constrained to lay them out in source code
> Does the JVM still have this flexibility with records?
> Will the JVM still have this flexibility with inline types?
> (I don't remember seeing this discussed/answered before, but I could be wrong!)
if as a developer you want to control the layout, yopu can use the foreign memory API of panama.
More information about the valhalla-dev