|
From: Leland H. <lh...@ec...> - 2003-04-26 20:52:36
|
Hello, I'm currently unable to identify the source of unfreed memory in my program. The following valgrind diagnotics don't list a line number or variable name. However I'm using vectors and vector iterators so these could cause the problem. FYI I use the following valgrind-1.9.5 options: valgrind -v --leak-check=yes --gdb-attach=yes --show-reachable=yes --trace-malloc=yes --leak-resolution=high --show-reachable=yes --gdb-attach=yes main How can I id the variable(s)? thanks, Leland H. ==23908== 13936 bytes in 5 blocks are still reachable in loss record 1 of 1 ==23908== at 0x4016A068: malloc (vg_clientfuncs.c:103) ==23908== by 0x8052FDF: __default_alloc_template<true, 0>::_S_chunk_alloc(unsigned int, int &) (/usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3/stl_alloc.h:490) ==23908== by 0x805310C: __default_alloc_template<true, 0>::_S_refill(unsigned int) (/usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3/stl_alloc.h:531) ==23908== by 0x805414B: __default_alloc_template<true, 0>::allocate(unsigned int) (/usr/local/gcc-2.95.3/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3/stl_alloc.h:419) ==23908== ==23908== LEAK SUMMARY: ==23908== definitely lost: 0 bytes in 0 blocks. ==23908== possibly lost: 0 bytes in 0 blocks. ==23908== still reachable: 13936 bytes in 5 blocks. ==23908== suppressed: 0 bytes in 0 blocks. ==23908== |
|
From: Bastien C. <ba...@ch...> - 2003-04-26 22:06:13
|
On Saturday 26 April 2003 22:52, Leland Hovey wrote: > I'm currently unable to identify the source of unfreed memory in my > program. The following valgrind diagnotics don't list a line number or > variable name. > However I'm using vectors and vector iterators so these could cause the > problem. > [...] You have run into something which is actually being discussed as a candidate for the FAQ :-) However, as of now, sf.net seems to have problems with archived mailing lists (it keeps telling me that the valgerind-users list is not archived yet, pah!), so I'll send it to you just after this mail as there is no need to repost it. Salut, Bastien -- -- The universe has its own cure for stupidity. -- -- Unfortunately, it doesn't always apply it. -- |