Object Format

PhiHo Hoang phiho.hoang at rogers.com
Sun Oct 13 20:23:08 UTC 2002


Hi,

<NuBlueBookQuote>
...
Since we still need to have the class oop, size and some flags available for
each object,
Squeak generally uses a larger header. The canonical header is three words:-
flags/hash/size encoded in one word, class oop, size.

However as a high proportion of objects are instances of a small set of
common classes,
and since few objects are large, it was decided to use three header formats
as follows:-

- One word - all objects have this header.
- 3 bits reserved for GC state machine (mark, old, dirty)
- 12 bits object hash (for hashed Set usage)
- 5 bits compact class index, non-zero if the class is in a group of classes
known as 'Compact Classes'
- 4 bits object format
- 6 bits object size, in 32-bit words
- 2 bits header type (0: 3-word, 1: 2-word, 2: free chunk of memory, not an
object at all, 3: 1-word)
...
</NuBlueBookQuote>

What is this 4-bit 'object format' field.

Where can I find further detailed information about this 'object format'.

Any pointer is very much appreciated.

Cheers,

PhiHo.

P.S: Plugins are really boring now. It's about time to learn _real_ object
;-)




More information about the Squeak-dev mailing list