[vm] Large Frame size

Rob Withers reefedjib at yahoo.com
Wed Oct 24 18:33:04 UTC 2007


----- Original Message ----- 
From: "Hans-Martin Mosner" <hmm at heeg.de>
To: "The general-purpose Squeak developers list" 
<squeak-dev at lists.squeakfoundation.org>
Sent: Tuesday, October 23, 2007 10:47 PM
Subject: Re: [vm] Large Frame size


> Rob Withers schrieb:
>>
>> ----- Original Message ----- From: "Rob Withers" <reefedjib at yahoo.com>
>>
>>> I think I'll work on defining a frame size of 80, as a nice round
>>> number.
>>
>> I just read the following comment in ObjectMemory
>> class>>#initializeWithBytesToWord:
>>
>> "Large contexts have 56 indexable fileds.  Max with single header word."
>>
>> Could someone explain what this is all about?  What is it about a
>> single header word that limits it?
>>
>> thanks,
>> Rob
>>
>>
> The single header word includes a size field which encodes for a maximum
> of 63 oop slots, of which one is the header word itself, 6 are instance
> variables, leaving 56 indexable slots.

What are the 6 instance variables for?  Ahh, I see: sender, pc, sp, method, 
(unused), receiver.

> Larger contexts would need a second and third header field to hold the
> object size. The comment to which you're referring indicates that in 64
> bit images, the context objects would need 3 header words, so it seems
> the VM should be able to handle it (however, I don't know whether it
> handles the mixture of 1 word headers for small contexts and 3 words for
> large contexts.)

Ok, so after reading through the appropriate ObjectMemory code, it looks as 
if  #instantiateContext:sizeInBytes: is already setup to handle a situation 
where the size exceeds the max size for a 2 word header, and uses a 3 word 
header if that's the case.  So I just initialized LargeContextSize to be 87 
words and regenerated the vm.  I changed the corresponding size in 
CompiledMethod.  I recompiledAll.  Everything seems to work.

Thanks, Hans!
Rob 




More information about the Squeak-dev mailing list