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.
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
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
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.
Bookmarks