c++ - How to interpret Valgrind output -
valgrind yields following message block:
1,065,024 bytes in 66,564 blocks lost in loss record 21 of 27 @ 0x4c2b800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) 0x40ca21: compute(parameters&, array<double>&) [clone .constprop.71] (array.hpp:135) 0x403e70: main (main.cpp:374) how read message?
main.cpp line 374 reads:
results[index] = compute(parameters, weights);
is memory leaked @ line 374 of main.cpp? leaked in compute() or maybe @ assignment/indexing results?
is memory leaked @ line 374 of main.cpp?
no. shows line number in main call made leads function , line memory allocated.
is leaked in compute() or maybe @ assignment/indexing results?
it says memory allocated in compute() not deallocated in program before program exited. that's constitutes memory leak.
Comments
Post a Comment