Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
hey I want to check that how much memory is allocated for my C program in memory when i run because I want to reduce the size of my program if I get that how much memory used my program so then its help to me to reduce the size.
so any can tell me how can I do this in C ?
On Windows:
Right click on the TaskBar
(Windows 7/ Windows 8) & CTRL+ALT+DEL
on Windows XP, click Start Task Mananger
. A windows will popup, go to Performance tab
and click on Resource Moniter
button. A new windows will pop up. Find your process there in the list of Memory section
.
On Linux:
Get pid of the process and type top -p PID
. It will display information about the process, including percent of system memory used.