How do I find the amount of memory installed on my QNX Neutrino system?
uname -a
doesn't show ittop
only shows how much memory is available- I've looked at
pidin syspage
without success pidin mem
shows all the used memory in gory detail
pidin info
will show the amount of memory installed, as shown below.
pidin info
CPU:X86 Release:6.4.1 FreeMem:836Mb/1015Mb BootTime:Jun 04 14:01:55 UTC 2014
showmem -S will show the amount of RAM memory installed as shown below,
System RAM: 1936M ( 2030043136) Total Used: 401M ( 420642376) Used Private: 317M ( 332529404) Used Shared: 79M ( 83333120) Other: 4667K ( 4779852) (includes IFS and reserved RAM)
The amount of free RAM is the size of "/proc" !
In your own program, you can write something like this :
#include <sys/stat.h>
struct stat buf;
if (stat("/proc", &buf) != -1) {
printf("Mem free = %d\n", buf.st_size);
}
-- Hope this help Emmanuel