Closed marcio-diaz closed 4 years ago
This doesn't look like a memory leak, just false positives. There is nothing in the trace that is called periodically. I think here is nothing to win.
This doesn't look like a memory leak, just false positives. There is nothing in the trace that is called periodically. I think here is nothing to win.
Even if the loop is me running and killing with ctr-c
while debugging something? :)
I don't understand your question. If you look at the traces, you see rocksdb, rayon and crossbeam. Everything looks like it initializes some global state, that is done once. Valgrind is always reporting this kind of stuff as false positives.
Are you sure that nothing is being leaked? I though that at least this one may be real because of the definitely
:
==374== 24,720 (16 direct, 24,704 indirect) bytes in 1 blocks are definitely lost in loss record 100 of 103
==374== at 0x4838DEF: operator new(unsigned long) (vg_replace_malloc.c:344)
I tried checking for memory leaks because last days I was debugging (running & stopping) substrate quite a lot and noticed that my computer was getting slow.
Feel free to close if you are sure it's ok.
Memory leaks only exist while the program runs, after the program is closed, the os frees all memory. So, even if you leak everything, the os cleans it up afterwards.
One time small memory leak is pointless to investigate because it is most likely relates to some initialisation code and hence a false positive. Even it is a real leak, as long as the leaked memory doesn't grow, it won't worth the time to investigate. I usually have the program ran for few hours and see the memory usage is actually growing indefinitely (without been recycled at all) before start investigating. If debugging makes your computer slow, it is more likely the debugger leaks resources.