Mon 07 May 2007 01:29:18 PM UTC, comment #2:
hi,Eric
>There is a bunch of call to xmlGetProp in either
>libCERTI/XmlParser.cc orRTIG/Federation.cc
>Would you suggest to replace all those calls with
>proper xmlGetProp / xmlFree pairing
>or do you think the only trouble may come
>from the example you have given?
yes,every xmlGetProp must be followed with xmlFree.
>Moreover, I did valgrind the billard application using
>valgrind --leak-check=full billard -n1 -fTest -FTest.xml -t 10
>and did not catch possible leaks (in the xmlParser region).
I have never used valgrind, so I can't give any commention about it.
I found this memory leak bug because I have made some benchmark about the "xml vs fed" parsing speed. My test code parsed the xml file 5000 times and the memory allocated by the program continually increased. After I fixed it by xmlFree, the memory allocated by the program became constant.
>Would you have time to propose us with
>a patch against current CVS?
As you seen, I haven't make full exam about the certi's code, and I think it's very convenient to fix it: just search all the "xmlGetProp" and add the "xmlFree" after the property has been worked.
|