[Gc] typed GC with marking routine...

Basile Starynkevitch basile at starynkevitch.net
Tue Mar 12 22:27:08 PST 2013

On Wed, Mar 13, 2013 at 11:55:04AM +1300, Bruce Hoult wrote:
> In what way is a bit mask giving the pointers inadequate to your
> needs? Do you have a possibility that some fields can be pointers or
> not depending on the value of other fields?

Yes, a typical example would be some kind of vector. The value knows the number of vector elements
which is generally smaller than the number of allocated elements. Another exemple is a 
discriminated union or sum type. The value knows which fields are pointers.

> Note that the bit mask is not the actual descriptor, but only an
> interface for building the descriptor. The current implementation
> optimizes the case where all the pointers are together in the initial
> words of the object (which a compiler writer can easily arrange to
> happen provided you don't have something like C++-style multiple
> inheritance.)

Thanks for your reply. Cheers.
Basile STARYNKEVITCH         https://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

More information about the Gc mailing list