Gathering Memory Statistics
I want to program a memory monitoring system, which gathers information regarding, which process is being allocated with the memory dynamically.
What is the procedure to collect the memory statics of a particular process. This program is being programmed in Red Hat Linux 9 with kernel version 2.4 Kindly Help. |
Your best bet is to intercept malloc(), free(), etc. to monitor what's going on. There's already a lot of these programs out there if you're not really looking to learn how, but just want the functionality. If you just want to find the data segment's break point you can look at /proc/<pid>/status. There's some memory information in there for each process, but the values only grow in <page_size> chunks.
|
All times are GMT -5. The time now is 08:22 PM. |