Any tool to find size of memory allocated dynamically using malloc/realloc?
问题 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