[m-dev.] for review: improved low-level debugging messages

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 17 12:27:00 AEDT 1999


On 17-Mar-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> > >  incr_hp_debug_msg(Word val, const Word *addr)
> > >  {
> > >  #ifdef CONSERVATIVE_GC
> > > -	printf("allocated %ld words at 0x%p\n", (long) (Integer) val, addr);
> > > +	printf("allocated %ld words at %p\n", (long) (Integer) val, addr);
> > 
> > Both the old code and the new code are buggy, because there is no guarantee
> > that (long) is the same size as `void *'.
> 
> You seem to be confused. The cast is on the size of the new cell, not
> the pointer.

Oops, yes, my mistake.

-- 
Fergus Henderson <fjh at 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 at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list