Maxim Fomin:

GC.sizeOf seems to return size of allocated page which is bigger than needed (for ex. it returns 16 for a new int which is 4).

The object instance contains a pointer to the virtual table, so there's a way to know what object it is. With that runtime information it should be possible to know the static size of the instance.

Bye,
bearophile

Reply via email to