<div dir="ltr">I am using valgrind to check for memory leaks.<div><br></div><div>valgrind claims that I do one more alloc than free, so I have been trying to track down the problem.</div><div><br></div><div>Just to be sure I understood what was going on I tried valgrind on the LOP example that comes with SCIP4.0.0</div><div><br></div><div>Running this:</div><div><div>valgrind --leak-check=full --show-leak-kinds=all bin/lop -v</div><div><br></div><div>(which just prints out version and build options) produces this valgrind output</div><div><br></div><div>....</div><div><br></div><div><div>ZIMPLOPT=opt</div><div> ZLIB=true</div><div>==31777== </div><div>==31777== HEAP SUMMARY:</div><div>==31777==     in use at exit: 72,704 bytes in 1 blocks</div><div>==31777==   total heap usage: 14,256 allocs, 14,255 frees, 1,345,646 bytes allocated</div><div>==31777== </div><div>==31777== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1</div><div>==31777==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)</div><div>==31777==    by 0x58ACEFF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)</div><div>==31777==    by 0x40104E9: call_init.part.0 (dl-init.c:72)</div><div>==31777==    by 0x40105FA: call_init (dl-init.c:30)</div><div>==31777==    by 0x40105FA: _dl_init (dl-init.c:120)</div><div>==31777==    by 0x4000CF9: ??? (in /lib/x86_64-linux-gnu/<a href="http://ld-2.23.so">ld-2.23.so</a>)</div><div>==31777==    by 0x1: ???</div><div>==31777==    by 0xFFEFFFCAA: ???</div><div>==31777==    by 0xFFEFFFCB2: ???</div><div>==31777== </div><div>==31777== LEAK SUMMARY:</div><div>==31777==    definitely lost: 0 bytes in 0 blocks</div><div>==31777==    indirectly lost: 0 bytes in 0 blocks</div><div>==31777==      possibly lost: 0 bytes in 0 blocks</div><div>==31777==    still reachable: 72,704 bytes in 1 blocks</div><div>==31777==         suppressed: 0 bytes in 0 blocks</div><div>==31777== </div><div>==31777== For counts of detected and suppressed errors, rerun with: -v</div><div>==31777== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)</div></div><div><br></div><div>This 72,704 bytes that is still reachable when running bin/lop is exactly the same number of allegedly still reachable bytes</div><div>that gets reported when I run my code. So presumably there is a common issue. Anyone know what is going on?</div><div><br></div><div>It looks like I don't have any memory problems since nothing is "lost" (for me or for LOP) but I would be interested to know what is going on.</div><div><br></div><div>When running "hello world" (in C, with no linking to SCIP), valgrind, as expected tells me that "All heap blocks were freed -- no leaks are possible", so this is probably</div><div>not a valgrind issue.</div><div><br></div><div>James</div><div><br></div>-- <br><div class="gmail_signature">James Cussens<br>Dept of Computer Science &<br>York Centre for Complex Systems Analysis<br>Room 326, The Hub, Deramore Lane            Tel    +44 (0)1904 325371<br>University of York                                        Fax  +44 (0)1904 500159<br>York YO10 5GE, UK                               <a href="http://www.cs.york.ac.uk/~jc" target="_blank">http://www.cs.york.ac.uk/~jc</a><br><a href="http://www.york.ac.uk/docs/disclaimer/email.htm" target="_blank">http://www.york.ac.uk/docs/disclaimer/email.htm</a></div>
</div></div>