[Vm-dev] Simple question about objects, headers and sizes

Bert Freudenberg bert at freudenbergs.de
Tue Jun 7 14:28:54 UTC 2011


On 06.06.2011, at 08:46, Javier Pimás wrote:

>  A better question would be, what is the bit format of the extra header?

See the class comment for ObjectMemory:

"If a class is in the compact class table, then this is the only header information needed.  If it is not, then it will have another header word at offset -4 bytes with its class in the high 30 bits, and the header type repeated in its low 2 bits.  It the objects size is greater than 255 bytes, then it will have yet another header word at offset -8 bytes with its full word size in the high 30 bits and its header type repeated in the low two bits."


- Bert -




More information about the Vm-dev mailing list