2

I am using C programming language in Linux platform and my question is how can I know how much I allocated in heap memory and other useful information such as peak usage in the heap memory. Is there a standard C function for this implementation?

Please advice.

Many thanks.

1 Answer 1

5

Since you're working on Linux, I am assuming you're using the GNU C Compiler. A little searching on Google revealed these websites...

GNU malloc statistics

Summary of malloc related functions

...that give information about the heap stats, which hopefully should contain the data you're looking for.

Good luck!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.