[GiNaC-list] Memory leak in dynallocate for relational

Thomas Luthe tluthe at physik.uni-bielefeld.de
Mon Jan 9 16:49:04 CET 2017


Hi,

valgrind reports a memory leak caused by dynallocate<GiNaC::relational,
const GiNaC::ex&, const GiNaC::ex&, GiNaC::relational::operators>
(basic.h:336). I have attached a minimal example as well as the
corresponding valgrind output I get. The executable was produced with
g++ 5.4 -O0 and GiNaC 1.7.1.

Repeated use of operators == or != for GiNaC::ex does indeed lead to a
noticeable increase of memory usage in applications, whereas
ex::is_equal does not have the same effect.

Cheers,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leaktest.cpp
Type: text/x-c++src
Size: 84 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20170109/e778a352/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leaktest.log
Type: text/x-log
Size: 2441 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20170109/e778a352/attachment.log>


More information about the GiNaC-list mailing list