This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Call for testers: libiberty/physmem.c
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: apinski at apple dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Fri, 21 Feb 2003 17:18:40 +0000
- Subject: Re: Call for testers: libiberty/physmem.c
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> > From: Andrew Pinski <apinski at apple dot com>
> >
> > On `OpenBSD grendel 3.1 GENERIC#4 i386' aka i?86-unknown-openbsd3.1:
> > total=0.000000Mb avail=0.000000Mb
> >
> > but `sysctl -A' gives:
> > hw.physmem = 536059904
> > hw.usermem = 535629824
> > hw.pagesize = 4096
> >
> > I think this might be the same problem on all *BSD (including darwin).
>
> Is `sysctl' a binary program or a system call? (Or both?)
>
> What would the C interface look like? What autoconf magic does it need?
>
> Thanks,
> --Kaveh
> --
> Kaveh R. Ghazi ghazi at caip dot rutgers dot edu
Both. See:
http://netbsd.gw.com/cgi-bin/man-cgi?sysctl+3+NetBSD-1.6
For NetBSD you would need CTL_HW and HW_PHYSMEM or HW_USERMEM.
R.