Call for testers: libiberty/physmem.c

Andrew Pinski apinski@apple.com
Fri Feb 21 15:53:00 GMT 2003


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).

Thanks,
Andrew Pinski


On Friday, Feb 21, 2003, at 06:28 US/Pacific, Kaveh R. Ghazi wrote:

> Now that the libiberty bits are installed, I'd like to see how many
> systems physmem.c works on.
>
> So far these are my results:
>
> Works?	Platform
> YES	sparc-solaris2.7
> YES	hpux11
> YES	x86-linux-gnu
> NO	mips-irix6.5
>
> I've already worked out something with the *utils maintainer for
> irix6 which I'll import from upstream.
>
> Given that x86-linux-gnu works, I'm assuming all linux-gnu does and
> probably all glibc systems in general.  But you never know.
>
> If people would please link the code below against the most recent
> libiberty.a from the trunk and/or 3.3 and tell me the results I would
> appreciate it.  (Zeros are bad.)
>
> I'm especially interested in the evaluation platforms listed in here.
> http://gcc.gnu.org/gcc-3.1/criteria.html
> E.g. *bsd, aix, cygwin,
>
> plus alpha-osf, hpux10, darwin and anywhere else you host gcc.
>
>
> If your favorite platform yields zero, don't panic, the GC heuristics
> will simply back down to the old default values.  But if you can
> provide suggestions on how to improve physmem.c for your platform I'd
> very much appreciate it.  Note physmem.c must run as non-root, so
> peeking into /dev/kmem etc. is not appropriate.
>
> 		Thanks,
> 		--Kaveh
>
>
> #include <stdio.h>
>
> extern double physmem_total(void);
> extern double physmem_available(void);
>
> int main(void)
> {
>   printf ("total=%fMb avail=%fMb\n",
> 	  physmem_total() / (1024 * 1024),
> 	  physmem_available() / (1024 * 1024));
>
>   return 0;
> }
>



More information about the Gcc mailing list