When computing the layout of an inline type, flattened fields are currently allocated before oops and primitive fields. This way to proceed sometimes wastes memory because small flattened fields are allocated before oops or bigger primitive fields (best layout is usually obtained when allocating from the biggest to the smallest fields).
In order to prevent such waste, big flattened fields should be allocated before oops, and small flattened fields should be allocated after, with other small primitive types.
Separation between oops and non-oops is still desired to optimize oop maps,
especially for non inline types classes.
In order to prevent such waste, big flattened fields should be allocated before oops, and small flattened fields should be allocated after, with other small primitive types.
Separation between oops and non-oops is still desired to optimize oop maps,
especially for non inline types classes.