Application to monitor the threads working set of a specific process
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Application to monitor the threads working set of a specific process

Hybrid View

  1. #1
    Join Date
    Aug 2012
    Posts
    8

    Application to monitor the threads working set of a specific process

    Hello,

    I'm looking for an application (Windows OS) to monitor the threads working set of a specific process. I've seen some applications that show the CPU used by the several threads of a process but none that shows their memory usage...

    I'm trying to find which thread of my application is requesting an excesive amount of memory.

    Thanks.

  2. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,632

    Re: Application to monitor the threads working set of a specific process

    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  3. #3
    Join Date
    Aug 2012
    Posts
    8

    Re: Application to monitor the threads working set of a specific process

    Thank you, but that application doesn't show the memory usage of each thread of a process, it only shows CPU usage...

  4. #4
    Join Date
    Jul 2012
    Posts
    13

    Re: Application to monitor the threads working set of a specific process

    Quote Originally Posted by S_M_A View Post
    I recommend this application but not in your case cause you want cpu usage

  5. #5
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,632

    Re: Application to monitor the threads working set of a specific process

    I'm sorry, I didn't fully read your request. I don't think you can find any application that shows memory usage for an individual threads. That requires that the memory management system registers thread info and I've never seen any proof of that. I.e. to acheive that I think you have to override new/delete and create your own statistics.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  6. #6
    Join Date
    Oct 2008
    Posts
    1,116

    Re: Application to monitor the threads working set of a specific process

    indeed, there's no "threads working set". By default, threads have their own stack but share the same heap and hence partecipate to the same "working set", which is a property of the process. BTW, depending on your expectation about the meaning of "memory usage/request", the working set could not necesserely coincide with the total memory "requested" by the process.

    So, I agree with S_M_A; in order to have a "logical" view of the allocated memory of single threads you need to 1) define what's a memory request for you ( in c++, allocator invocations, new/malloc calls, OS memory management calls ... ) then 2) instrument the code accordingly, by placing callbacks or any other tracing means manually or via your preferred profiling framework.

  7. #7
    Join Date
    Aug 2012
    Posts
    8

    Re: Application to monitor the threads working set of a specific process

    Ok, thanks.

    I think I'll try a profiler to analyse the memory usage (virtual memory, windows heap, COM, C Runtime allocations).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center