Hi,
I have a MS-Visual Studio 2005 workspace having all c code. This application(exe) allocates memory dynamically from heap using malloc and realloc. I want to calculate the maximum size allocated size allocated on heap using malloc/realloc by this application program when i run particular test case.
I do not want to change the code by noting the malloc sizes and accumulating them, because:
a) there can be a scenario, that some memory of 1KB is malloc'ed, then freed, and then a memory of 2KB is malloc'ed. So max is 2KB, which i need to get as the value and not 1+2=3KB.
So i have to really see whereall malloc/free is happening in this code and add code for this, which i want to avoid.
1) So are there any tools(freeware/licensed) to find size of maximum or total memory allocated dynamically using malloc/realloc?
2)Does MS Visual Studio 2005/2008 itself provide anything of this sort?
thanks,
-AD