0

How do I find the amount of memory installed on my QNX Neutrino system?

  • uname -a doesn't show it
  • top 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
kmort
  • 2,848
  • 2
  • 32
  • 54

3 Answers3

6

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
kmort
  • 2,848
  • 2
  • 32
  • 54
4

showmem -S will show the amount of RAM memory installed as shown below,

showmem -S

System RAM: 1936M ( 2030043136) Total Used: 401M ( 420642376) Used Private: 317M ( 332529404) Used Shared: 79M ( 83333120) Other: 4667K ( 4779852) (includes IFS and reserved RAM)

  • Awesome! I can't believe I didn't see that one. Your answer is better than mine. :-) Thanks a bunch. – kmort Jun 27 '14 at 12:23
4

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

Emmanuel H.
  • 101
  • 1