Patch: *bsd & darwin support in libiberty/physmem.c

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sat Feb 22 18:04:00 GMT 2003


 > From: Krzysztof Parzyszek <kparz@iastate.edu>
 > 
 > On Fri, Feb 21, 2003 at 06:11:58PM -0500, Kaveh R. Ghazi wrote:
 > >  > It applies cleanly against the current gcc trunk's libiberty.  (I
 > >  > made an update for irix6 earlier today.)
 > > 
 > > This one applies cleanly after Rainer's install.  Try it instead,
 > > thanks.
 > >
 > [snip] 
 > > +	if (sysctl(mib, ARRAY_SIZE(mib), &physmem, &len, NULL, 0) == 0)
 > > +	  return (double)physmem * pagesize;
 > > +      }
 > [snip[
 > > +	if (sysctl(mib, ARRAY_SIZE(mib), &usermem, &len, NULL, 0) == 0)
 > > +	  return (double)usermem * pagesize;
 > > +      }
 > 
 > This causes the test code to produce
 > total=2082304.000000Mb avail=1836704.000000Mb

Yup, it's fixed in what got checked in.  Do cvs update and please retest.

 > 
 > The values of physmem and usermem are in bytes, not in pages (at least
 > on 4.x).
 > Krzysztof

Freebsd right?


--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-patches mailing list