tags:

views:

45

answers:

1

Hi,

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.

+3  A: 

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!

ADogg