[CppAD] possible memory leak

Jochen Siehr Jochen.Siehr at iwr.uni-heidelberg.de
Fri Jul 15 10:26:14 EDT 2011


Hi,

I've been using the svn-Repository of CppAD for quite a while. The 
results for my small test example using valgrind for memory check with 
CppAD revision 1947 (2011-05-12 05:09:07) are fine:

************************************************************************
==21912== Memcheck, a memory error detector
==21912== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==21912== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==21912== Command: test_1
==21912==
jac[0] = 1
jac[1] = 0.4
jac[2] = 2.718
jac[3] = 3.14
==21912==
==21912== HEAP SUMMARY:
==21912==     in use at exit: 0 bytes in 0 blocks
==21912==   total heap usage: 50 allocs, 50 frees, 1,297 bytes allocated
==21912==
==21912== All heap blocks were freed -- no leaks are possible
==21912==
==21912== For counts of detected and suppressed errors, rerun with: -v
==21912== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
************************************************************************

Using revision 1948 or later the result is:

************************************************************************
==21943== Memcheck, a memory error detector
==21943== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==21943== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==21943== Command: test_1
==21943==
jac[0] = 1
jac[1] = 0.4
jac[2] = 2.718
jac[3] = 3.14
==21943==
==21943== HEAP SUMMARY:
==21943==     in use at exit: 1,120 bytes in 8 blocks
==21943==   total heap usage: 25 allocs, 17 frees, 1,488 bytes allocated
==21943==
==21943== LEAK SUMMARY:
==21943==    definitely lost: 0 bytes in 0 blocks
==21943==    indirectly lost: 0 bytes in 0 blocks
==21943==      possibly lost: 0 bytes in 0 blocks
==21943==    still reachable: 1,120 bytes in 8 blocks
==21943==         suppressed: 0 bytes in 0 blocks
==21943== Rerun with --leak-check=full to see details of leaked memory
==21943==
==21943== For counts of detected and suppressed errors, rerun with: -v
==21943== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
************************************************************************

So there seems to be a memory leak. It would be nice, if this could be 
fixed.

Regards,
Jochen




-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_1.cpp
Type: text/x-c++src
Size: 693 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/cppad/attachments/20110715/e2ad006a/attachment.bin 


More information about the CppAD mailing list