cvs commit: src/sys/vm vm_map.c

Andrew Gallatin gallatin at cs.duke.edu
Mon Jun 28 12:59:46 PDT 2004


Brian Fundakowski Feldman writes:
 > On Mon, Jun 28, 2004 at 03:22:33PM -0400, Andrew Gallatin wrote:
 > > Andrew Gallatin [gallatin at FreeBSD.org] wrote:
 > > > gallatin    2004-06-28 19:15:40 UTC
 > > > 
 > > >   FreeBSD src repository
 > > > 
 > > >   Modified files:
 > > >     sys/vm               vm_map.c 
 > > >   Log:
 > > >   Fix alpha - the use of min() on longs was loosing the high bits and
 > > >   returning wrong answers, leading to strange values vm2->vm_{s,t,d}size.
 > > 
 > > Why are min() and max() inlines which operate on ints?  This seems
 > > like a real landmine for 64-bit platforms..
 > 
 > Also, why is GCC not generating the correct warnings?  The values passed
 > in were definitely a 64-bit type.  Thanks for finding and fixing this.

I wish I knew.   I'm afraid this may bite us at some other point?

 > The inlines seem to exist to work around the effect of using macros
 > unknowingly on statements with side effects.  These should really be
 > MIN(), and there seems to have been an extra tab that crept in.  Do
 > you think you could change those things?

Sure.  Already done.  Thanks for the blessing to use MIN().

Drew


More information about the cvs-src mailing list