Bryce McKinlay wrote:
Currently, calls to the Java object allocation routines (eg
_Jv_AllocObject) pass both a class parameter and a size parameter.
Hard coding the size parameter at the call site contradicts binary
compatibility, since the size of the object being created may change
at runtime. Even without binary compatibility, passing the size
parameter is redundant because the size of the type can be trivially
obtained from class metadata.
I think the reason was so _Jv_AllocObject could also be used to allocate
arrays. As long as arrays no longer use _Jv_AllocObject, it's fine to
remove the size perhaps.