Getting memory information with Qt

后端 未结 3 2030
迷失自我
迷失自我 2020-12-07 17:56

How can I obtain this information:

  • Total Memory
  • Free Memory
  • Memory used by current running application ?

I think Qt should hav

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 18:26

    Much better on POSIX OSes (Linux, Solaris, perhaps latest MacOS...) :

    • getrusage(...) secially look at ru_maxrss.
    • getrlimit(...) but I did not find any usefull info into.
    • sysconf(...) : _SC_PAGESIZE, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES
    • sysinfo(...) : totalram, freeram, sharedram, totalswap,...

    So much treasures on POSIX computers not available on Windows.

提交回复
热议问题