[Gc] gc on 64-bit machines

Boehm, Hans hans.boehm at hp.com
Wed Oct 27 11:30:26 PDT 2004

Those casts should be to (word), not (long long).  I fixed
those particular ones in my source.  Thanks.

Unfortunately, I expect this problem is quite widespread.
I consider these casts to be a bug, and have so for quite
a while.  But the collector has never been tested on an
LLP64 platform (i.e. Windows 64, I presume; I know of no

It's on my list to look at, but I would do it in the context
of 7.0alpha1.  But aside from finding
the time, I would have to dig up a Windows 64 tool chain first.


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Peter Colson
> Sent: Tuesday, October 26, 2004 10:51 PM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] gc on 64-bit machines 
> 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) & 
> ~(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?
> Regards,
> Peter Colson.
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/

More information about the Gc mailing list