[squeak-dev] Re: [Vm-dev] Fwd: [Pharo-project] is it possible to know the memory occupation (bytes) of an object?

stephane ducasse stephane.ducasse at gmail.com
Wed Apr 28 19:15:39 UTC 2010

> It's close but not entirely correct. The computation needs to include the extra header word for "large" instances (> 255 bytes). Squeak has three possible header sizes:
> 	1 header word  - used by compact classes
> 	2 header words - used by regular classes
> 	3 header words - used by "large" instances

mariano you should have a look at the object engine chapter written by tim (available on my web page)
it explains the different headers.

More information about the Vm-dev mailing list