Garbage Collection
Thursday, January 15, 2009 at 1:55PM Garbage collection is a pretty critical decision when building a virtual machine. It determines a bunch of other decisions such as object layout in memory. For a good overview of different garbage collection techniques checkout wikipedia. To see some of the other issues that you face when actually building a GC, there is a really good FAQ on the I.E.C.C GC List FAQ.
Normal binary would be:
0000 0100
SquirrelFish internal representation:
0000 1001
There are other tags in SquirrelFish as well. The implementation details as well as the other comments are in JSImmediate.h..
* Tip from Aaron. Pointers are guaranteed to point to aligned word boundaries.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 00
[ high 30 bits: pointer address ] [ low 2 bits -- always 0 ]XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 1
[ high 31 bits: signed integer ] [ lowest bit -- always 1 ]
000000000000000000000000000 01 10
[ boolean value ] [ bool ] [ tag 'other' ]000000000000000000000000000 10 10
[ zero ] [ undefined ] [ tag 'other' ]000000000000000000000000000 00 10
[ zero ] [ zero ] [ tag 'other' ]
