[Vm-dev] how many free bits we have in Object Header?
David T. Lewis
lewis at mail.msen.com
Tue May 4 11:09:17 UTC 2010
On Tue, May 04, 2010 at 11:49:11AM +0200, Mariano Martinez Peck wrote:
>
> Hi folks. I think I am using the last free bit in the object header. For the
> moment, I am using this:
>
> ObjectMemory >> initializeObjectHeaderConstants
>
> .....
>
> "masks for root and mark bits"
> MarkBit := 1 bitShift: BytesPerWord*8 - 1. "Top bit"
> RootBit := 1 bitShift: BytesPerWord*8 - 2. "Next-to-Top bit"
> AllButMarkBit := WordMask - MarkBit.
> AllButRootBit := WordMask - RootBit.
>
> AllButMarkBitAndTypeMask := AllButTypeMask - MarkBit.
>
> UsedObjectBit := 1 bitShift: BytesPerWord*8 - 3. "Next-to-Top bit"
> AllButUsedBit := WordMask - UsedObjectBit.
>
>
>
> Now...the question is, is there another free bit in the object header ? I
> need another one :(
Based on the comment at the bottom of Interpreter>>internalIsImmutable:
I suspect that somebody else has their eye on that last available bit
also ;-)
Dave
More information about the Vm-dev
mailing list