[Vm-dev] extending every header by a word
Rob Withers
reefedjib at yahoo.com
Thu Nov 1 15:33:50 UTC 2007
I am looking into what changes will be required for me to add a word to
every header. I am hoping someone can give me a 5 minute overview to
confirm/extend what I have learned from A Tour of the Squeak OE.
I see on page 20 of the Tour of the Sq OE the layout of an object in memory,
with headers. The first decision is where does the new vatHeader go, and
since it will go on every header, I think I will put it just before the
baseHeader, such that headers look like:
type: 3
<vatHeader>
<baseHeader>
type: 1
<classHeader>
<vatHeader>
<baseHeader>
type: 0
<sizeHeader>
<classHeader>
<vatHeader>
<baseHeader>
So looking into the code, I see the BaseHeaderSize running around all over
the place, but please correct me, this is just to account for the fact that
an oop points to the first header word, so it gets sized and stripped in
various situations. I am hoping this should not be affected by a header
size increase.
I have just started looking, but I see that I will need to change the
#classHeader:, #sizeHeader, add #vatHeader:, and anywhere that writes to the
classHeader and sizeHeader, like:
#allocate:headerSize:h1:h2:h3:doFill:with:. This is by no means exhaustive.
Is there anything in particular you can point me to consider or warn me of?
many thanks,
Rob
More information about the Vm-dev
mailing list