[Gc] gc on 64-bit machines

Peter Colson pcolson at connexus.net.au
Tue Oct 26 22:51:20 PDT 2004

Has the gc been seen to work on 64-bit machines?

I see code that refers to CPP_WORD_SZ 64 and being able to typedef 
GC_word as unsigned long long. Which I have done.

The platform I am on is an LLP64 type system (sizeof(long) < 
sizeof(long long) == sizeof(ptr)) rather than a LP64 system 
(sizeof(long) == sizeof(ptr)).

In mark.c/GC_push_all_eager() I see:

     void GC_push_all_eager(ptr_t bottom, ptr_t top)
         word * b = (word *)(((long) bottom + ALIGNMENT-1) & 
         word * t = (word *)(((long) top) & ~(ALIGNMENT-1));

The casting of bottom and top to a long (rather than a long long) will 
result in loss of information. I assume I should change this to 'long 
long' or 'word'.

If this is indeed a problem, what is the feeling as to how widespread 
it may be throughout the gc?

Peter Colson.

More information about the Gc mailing list