determining size of physical memory

Heiko Blume src at scuzzy.in-berlin.de
Wed Jan 2 14:46:26 AEST 1991


>In article <1990Dec27.202715.27688 at Neon.Stanford.EDU>, hitt at Neon.Stanford.EDU (Daniel Hitt) writes:
> Is there a standard UNIX program or system call that determines
> the size of the physical memory of the machine on which it is
> running?
> 
> I'd like to be able to do this on Ultrix, SunOS, and the NeXT OS,
> and possibly HP-UX.

sounds like you'll have to use #ifdef :-) anyway, you might look for
'machine specific' system calls, for example sys V/386 (interactive
in my case) lets you do 

#include <sys/sysi86.h>
long bytes;
bytes=sysi86(SI86MEM);
-- 
      Heiko Blume <-+-> src at scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93
                    public source archive [HST V.42bis]:
        scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp
                     uucp scuzzy!/src/README /your/home



More information about the Comp.unix.questions mailing list