Let’s say I have created a program in C/C++ and have a source code.
I’d like to know the total memory during the program execution.
Someone has mentioned something about “malloc” and “hook”
Is there any other way to trace the spaced used?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are running Linux or something Unix-based, you could most likely use Valgrind. Valgrind runs the program and intercepts all of its memory allocations and prints the stats once it exits. It’s a very useful tool for checking for memory leaks and memory usage. If you’re running Windows, I haven’t a clue.