Re: [xml] Help: memory leak ??



> Resident memory increase is not a sure indication of a memory leak.
> Use valgrind to figure out whether you have memory leaks and where
> they come from.
 
I think valgrind also detect memory leaks.
The followings are the last part of the valgrind output

==2159== 1 errors in context 5 of 5:
==2159== Conditional jump or move depends on uninitialised value(s)
==2159==    at 0x3BC700FDC7: (within /lib64/ld-2.3.4.so)
==2159==    by 0x3BC7004204: (within /lib64/ld- 2.3.4.so)
==2159==    by 0x3BC7004804: (within /lib64/ld-2.3.4.so)
==2159==    by 0x3BC7001A70: (within /lib64/ld-2.3.4.so)
==2159==    by 0x3BC700E328: (within /lib64/ld-2.3.4.so)
==2159==    by 0x3BC700147D: (within /lib64/ld-2.3.4.so)
==2159==    by 0x3BC7000A87: (within /lib64/ld- 2.3.4.so)
==2159== IN SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
==2159==
==2159== malloc/free: in use at exit: 70,100 bytes in 1,200 blocks.
==2159== malloc/free: 6,400 allocs, 5,200 frees, 1,690,300 bytes allocated.
==2159==
==2159== searching for pointers to 1,200 not-freed blocks.
==2159== checked 199,552 bytes.
==2159==
==2159==
==2159== 5,300 bytes in 600 blocks are indirectly lost in loss record 1 of 4
==2159==    at 0x4904D9E: malloc (vg_replace_malloc.c:149)
==2159==    by 0x3BC9EC4389: xmlStrndup (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E4A428: xmlNewNsProp (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EC88A5: xmlSAX2StartElementNs (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBAFBB: (within /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEE1A: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEBE5: xmlParseContent (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBF000: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E3254E: xmlParseDocument (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E4598D: xmlSAXParseMemoryWithData (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x4008BA: test (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==    by 0x40091D: main (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==
==2159==
==2159== 9,600 bytes in 100 blocks are indirectly lost in loss record 2 of 4
==2159==    at 0x4904D9E: malloc (vg_replace_malloc.c:149)
==2159==    by 0x3BC9E4A3D3: xmlNewNsProp (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EC88A5: xmlSAX2StartElementNs (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBAFBB: (within /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEE1A: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEBE5: xmlParseContent (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBF000: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E3254E: xmlParseDocument (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E4598D: xmlSAXParseMemoryWithData (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x4008BA: test (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==    by 0x40091D: main (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==
==2159==
==2159== 70,100 (19,200 direct, 50,900 indirect) bytes in 200 blocks are definitely lost in loss record 3 of 4
==2159==    at 0x4904D9E: malloc (vg_replace_malloc.c:149)
==2159==    by 0x3BC9E4A3D3: xmlNewNsProp (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EC88A5: xmlSAX2StartElementNs (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBAFBB: (within /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEE1A: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEBE5: xmlParseContent (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBF000: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E3254E: xmlParseDocument (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E4598D: xmlSAXParseMemoryWithData (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x4008BA: test (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==    by 0x40091D: main (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==
==2159==
==2159== 36,000 bytes in 300 blocks are indirectly lost in loss record 4 of 4
==2159==    at 0x4904D9E: malloc (vg_replace_malloc.c:149)
==2159==    by 0x3BC9EC7F16: (within /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EC8315: xmlSAX2StartElementNs (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBAFBB: (within /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEE1A: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBEBE5: xmlParseContent (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9EBF000: xmlParseElement (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E3254E: xmlParseDocument (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x3BC9E4598D: xmlSAXParseMemoryWithData (in /usr/lib64/libxml2.so.2.6.16)
==2159==    by 0x4008BA: test (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==    by 0x40091D: main (in /home/tyhong/SMS/Monitoring/Manim/xmltest)
==2159==
==2159== LEAK SUMMARY:
==2159==    definitely lost: 19,200 bytes in 200 blocks.
==2159==    indirectly lost: 50,900 bytes in 1,000 blocks.
==2159==      possibly lost: 0 bytes in 0 blocks.
==2159==    still reachable: 0 bytes in 0 blocks.
==2159==         suppressed: 0 bytes in 0 blocks.
--2159--  memcheck: sanity checks: 8 cheap, 1 expensive
--2159--  memcheck: auxmaps: 133 auxmap entries (8512k, 8M) in use
--2159--  memcheck: auxmaps: 1038620 searches, 1318344 comparisons
--2159--  memcheck: SMs: n_issued      = 50 (800k, 0M)
--2159--  memcheck: SMs: n_deissued    = 0 (0k, 0M)
--2159--  memcheck: SMs: max_noaccess  = 524287 (8388592k, 8191M)
--2159--  memcheck: SMs: max_undefined = 0 (0k, 0M)
--2159--  memcheck: SMs: max_defined   = 156 (2496k, 2M)
--2159--  memcheck: SMs: max_non_DSM   = 50 (800k, 0M)
--2159--  memcheck: max sec V bit nodes:    0 (0k, 0M)
--2159--  memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0)
--2159--  memcheck: max shadow mem size:   4944k, 4M
--2159-- translate:            fast SP updates identified: 2,038 ( 89.5%)
--2159-- translate:   generic_known SP updates identified: 166 (  7.2%)
--2159-- translate: generic_unknown SP updates identified: 72 (  3.1%)
--2159--     tt/tc: 7,636 tt lookups requiring 7,824 probes
--2159--     tt/tc: 7,636 fast-cache updates, 2 flushes
--2159--  transtab: new        2,624 (57,685 -> 1,130,208; ratio 195:10) [0 scs]
--2159--  transtab: dumped     0 (0 -> ??)
--2159--  transtab: discarded  0 (0 -> ??)
--2159-- scheduler: 899,156 jumps (bb entries).
--2159-- scheduler: 8/17,137 major/minor sched events.
--2159--    sanity: 9 cheap, 1 expensive checks.
--2159--    exectx: 30,011 lists, 86 contexts (avg 0 per list)
--2159--    exectx: 11,605 searches, 11,619 full compares (1,001 per 1000)
--2159--    exectx: 2,695 cmp2, 10 cmp4, 0 cmpAll
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]