[gclist] Experience with Boehm-Demers-Weiser on Alpha in 32 bit mode?

Fergus Henderson fjh@cs.mu.OZ.AU
Fri, 9 Oct 1998 15:55:51 +1000


On 08-Oct-1998, Allyn Dimock <dimock@deas.harvard.edu> wrote:
> 
> I assumed that the latest (non-alpha-point) release of
> Boehm-Demers-Weiser ( gc4.12.tar.gz 07-Aug-98 17:23 ) would work out
> of the box, but this isn't the case: after making what seemed the
> reasonable tweaks for word size 32 and 4 byte alignment to the
> parameters for compiling gc4 on the Alpha, we ended up with a garbage
> collector that crashed during initialization.  (64 bit mode tested out
> fine but can't be used with our code generator).
> 
> Our pointers use the low 2 bits for tag info, but that shouldn't be an
> issue.

Well, it is an issue, just one that is easily resolved: you need to
either compile with ALL_INTERIOR_POINTERS enabled, or do the
appropriate calls to GC_register_displacement() at startup:

        /* The following code is necessary to tell the conservative */
        /* garbage collector that we are using tagged pointers */
        {
                int i;

                for (i = 1; i < (1 << TAGBITS); i++) {
                        GC_register_displacement(i);
                }
        }

In my experience, the usual source of difficulties with porting the
Boehm collector is ensuring that the root set is accurate.  But
"crashed during initialization" isn't really enough information to
diagnose the problem.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.