Detecting memory leak in complicating source code
I'am trying to run a code which performs continuously min-cuts to a graph until it detects dense subgraphs.
Unfortunately, it seems that there is a memory leak and the program exits. As the program is constituted of many files, it is really difficult to detect the memory leak error.
I was wondering if there is a way to print the size of the allocated memory after each min-cut in order to test my code and find the memory leak.