Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]QProcess get RAM usage of a program
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]QProcess get RAM usage of a program

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 5.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jake007
    wrote on last edited by
    #1

    Hi!

    I'm looking for a way how to get memory (RAM) consumption of a program started by QProcess.
    Unfortunately I haven't found anything in documentation. Can somebody please tell me how, or at least point me in the right direction.

    Thanks in advance.
    Regards,
    Jake


    Code is poetry

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Determining the memory usage of an application is not supported by Qt API. What's more, it is difficult to do in general. What do you count as the memory usage of an application? Many applications use shared libraries, that are only loaded once. Still, these libraries are counted with the application RAM usage, if you take a naive approach. OTOH, if such a library is only used by a single application, what do you count? How about applications that have multiple running instances?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jake007
        wrote on last edited by
        #3

        Looks like I'll have some fun using preprocessor directives for writing cross platform function.

        As memory usage, I mean amount of RAM used, like it's shown in Task Manager or top command in linux/unix OS. Application will be strict C/C++ programs without any threads, external libraries and "system()" functions. And I assume, that on every OS standard C/C++ libraries are constantly kept on RAM, so I can overlook that.

        Thanks for helping!

        Regards,
        Jake


        Code is poetry

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved