I am writing a program in c++. The program is killed by id 9 after more than 2000 steps.
Valgrind was not very useful to find the leak. Dose anyone have any suggestion to find which part of the code eats up the memory.
Unfortunately, the code is too long to be written here.
Is there any built-in function I can call before and after each loop to compare the memory usage of the loops?