If you don't feel like reading proc or want to make things more portable, use libgtop. On Tue, 2006-11-14 at 10:57 +0000, Glynn Clements wrote: > Prasanta Sadhukhan wrote: > > > Actually, I have the process-pid(s) and I want to find out > > programmatically, what's the max heap size that had been consumed by > > that process at any given moment(based on user command) from another > > process. > > Then you need to read the files in /proc/<pid>/*. There isn't a system > call to get resource usage for another process. > > Note that you won't be able to determine how much of the allocated > heap is free or used; that information is internal to the process, and > isn't visible externally. > - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html