Search code examples
qnx

Find amount of installed memory on QNX system


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

Solution

  • 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