к примеру вот мое: valgrind --tool=memcheck ./editor2 ==6181== Memcheck, a memory error detector for x86-linux. ==6181== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==6181== Using valgrind-2.4.0, a program supervision framework for x86-linux. ==6181== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==6181== For more details, rerun with: -v ==6181== ==6181== Conditional jump or move depends on uninitialised value(s) ==6181== at 0x6ECBE0: strstr (in /lib/libc-2.3.5.so) ==6181== by 0x7F36E7: __pthread_initialize_minimal (in /lib/libpthread-2.3.5.so) ==6181== by 0x7F3297: (within /lib/libpthread-2.3.5.so) ==6181== by 0x7F2E7F: (within /lib/libpthread-2.3.5.so) ==6181== by 0x1B8F1DCA: call_init (in /lib/ld-2.3.5.so) ==6181== by 0x1B8F1EEC: _dl_init (in /lib/ld-2.3.5.so) ==6181== by 0x1B8E47CE: (within /lib/ld-2.3.5.so) ==6181== ==6181== Conditional jump or move depends on uninitialised value(s) ==6181== at 0x6ECBE4: strstr (in /lib/libc-2.3.5.so) ==6181== by 0x7F36E7: __pthread_initialize_minimal (in /lib/libpthread-2.3.5.so) ==6181== by 0x7F3297: (within /lib/libpthread-2.3.5.so) ==6181== by 0x7F2E7F: (within /lib/libpthread-2.3.5.so) ==6181== by 0x1B8F1DCA: call_init (in /lib/ld-2.3.5.so) ==6181== by 0x1B8F1EEC: _dl_init (in /lib/ld-2.3.5.so) ==6181== by 0x1B8E47CE: (within /lib/ld-2.3.5.so) ==6181== ==6181== Conditional jump or move depends on uninitialised value(s) ==6181== at 0x804B248: (within /opt/prog/editor2) ==6181== ==6181== Conditional jump or move depends on uninitialised value(s) ==6181== at 0x804B253: (within /opt/prog/editor2) ==6181== ==6181== ERROR SUMMARY: 104 errors from 4 contexts (suppressed: 394 from 2) ==6181== malloc/free: in use at exit: 1889729 bytes in 497 blocks. ==6181== malloc/free: 89898 allocs, 89401 frees, 31731824 bytes allocated. ==6181== For counts of detected errors, rerun with: -v ==6181== searching for pointers to 497 not-freed blocks. ==6181== checked 244612 bytes. ==6181== ==6181== LEAK SUMMARY: ==6181== definitely lost: 1866072 bytes in 96 blocks. ==6181== possibly lost: 0 bytes in 0 blocks. ==6181== still reachable: 23657 bytes in 401 blocks. ==6181== suppressed: 0 bytes in 0 blocks. ==6181== Use --leak-check=full to see details of leaked memory. с ключем --leak-check=full еще больше информации: ==6185== ==6185== Conditional jump or move depends on uninitialised value(s) ==6185== at 0x804B248: (within /opt/prog/editor2) ==6185== ==6185== Conditional jump or move depends on uninitialised value(s) ==6185== at 0x804B253: (within /opt/prog/editor2) ==6185== ==6185== ERROR SUMMARY: 80 errors from 4 contexts (suppressed: 333 from 2) ==6185== malloc/free: in use at exit: 1889729 bytes in 497 blocks. ==6185== malloc/free: 89908 allocs, 89411 frees, 31732864 bytes allocated. ==6185== For counts of detected errors, rerun with: -v ==6185== searching for pointers to 497 not-freed blocks. ==6185== checked 244612 bytes. ==6185== ==6185== ==6185== 421584 (156 direct, 421428 indirect) bytes in 13 blocks are definitely lost in loss record 41 of 46 ==6185== at 0x1B909222: malloc (vg_replace_malloc.c:130) ==6185== by 0x80496E7: (within /opt/h2/editor2) ==6185== ==6185== ==6185== 1444488 (36 direct, 1444452 indirect) bytes in 3 blocks are definitely lost in loss record 45 of 46 ==6185== at 0x1B909222: malloc (vg_replace_malloc.c:130) ==6185== by 0x8049649: (within /opt/h2/editor2) ==6185== by 0x492E524E: ??? ==6185== ==6185== LEAK SUMMARY: ==6185== definitely lost: 192 bytes in 16 blocks. ==6185== indirectly lost: 1865880 bytes in 80 blocks. ==6185== possibly lost: 0 bytes in 0 blocks. ==6185== still reachable: 23657 bytes in 401 blocks. ==6185== suppressed: 0 bytes in 0 blocks. ==6185== Reachable blocks (those to which a pointer was found) are not shown. то есть правильно ли я понял что 100% потеряно 192 байта? а indirectly lost это чьё?
Ответ на:
комментарий
от php-coder
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум c, glib, memory leak? (2009)
- Форум valgrind (2010)
- Форум [SOLVED]valgrind: still reachable (2020)
- Форум Conditional jump or move depends on uninitialised value(s) (2008)
- Форум valgrind (2008)
- Форум Фокс и память (2007)
- Форум Xlib: memory leaks (2021)
- Форум QT memory leak? (2004)
- Форум valgrind + MySQL++ (2008)
- Форум valgrind and pthread (2005)