List:MySQL++« Previous MessageNext Message »
From:Bruno Adami Date:May 11 2009 12:52pm
Subject:RE: Possible memory leak?
View as plain text  
How do I answer your answer? :o

Interesting, I installed the libc6-dbg (it was not installed), and the
first invalid acess desapeared! But the leaks still persist:

==28928== Memcheck, a memory error detector.
==28928== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==28928== Using LibVEX rev 1884, a library for dynamic binary translation.
==28928== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==28928== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework.
==28928== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==28928== For more details, rerun with: -v
==28928== 
Check1
Check2
Check3
Check4
Check5
==28928== 
==28928== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 31 from 2)
==28928== malloc/free: in use at exit: 61,336 bytes in 16 blocks.
==28928== malloc/free: 124 allocs, 108 frees, 157,076 bytes allocated.
==28928== For counts of detected errors, rerun with: -v
==28928== searching for pointers to 16 not-freed blocks.
==28928== checked 622,292 bytes.
==28928== 
==28928== 16 bytes in 1 blocks are still reachable in loss record 1 of 2
==28928==    at 0x4026FDE: malloc (vg_replace_malloc.c:207)
==28928==    by 0x434A52C: my_malloc (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x434B2DA: my_error_register (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x434A13F: init_client_errs (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x4348B18: mysql_server_init (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x4370E58: mysql_init (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x40548B3: mysqlpp::DBDriver::DBDriver() (dbdriver.cpp:48)
==28928==    by 0x404E12F: mysqlpp::Connection::Connection(bool) (connection.cpp:41)
==28928==    by 0x80489F9: main (main.cpp:7)
==28928== 
==28928== 
==28928== 61,320 bytes in 15 blocks are still reachable in loss record 2 of 2
==28928==    at 0x4026FDE: malloc (vg_replace_malloc.c:207)
==28928==    by 0x4351CD2: my_once_alloc (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x43523AA: (within /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x4352E41: (within /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x435305F: get_charset_by_csname (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x4370C22: mysql_init_character_set (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==    by 0x4372D1D: mysql_real_connect (in /usr/lib/libmysqlclient.so.15.0.0)
==28928==   
by 0x40553A9: mysqlpp::DBDriver::connect(char const*, char const*,
unsigned int, char const*, char const*, char const*) (dbdriver.cpp:89)
==28928==   
by 0x404EDE9: mysqlpp::Connection::connect(char const*, char const*,
char const*, char const*, unsigned int) (connection.cpp:98)
==28928==    by 0x8048A7F: main (main.cpp:11)
==28928== 
==28928== LEAK SUMMARY:
==28928==    definitely lost: 0 bytes in 0 blocks.
==28928==      possibly lost: 0 bytes in 0 blocks.
==28928==    still reachable: 61,336 bytes in 16 blocks.
==28928==         suppressed: 0 bytes in 0 blocks.

Should I worry about the memory leaks?

_________________________________________________________________
Emoticons e Winks super diferentes para o Messenger. Baixe agora, é grátis!
http://specials.br.msn.com/ilovemessenger/pacotes.aspx
Thread
Possible memory leak?Bruno Adami11 May
  • RE: Possible memory leak?Mark Easton11 May
  • Re: Possible memory leak?Warren Young11 May
    • RE: Possible memory leak?Bruno Adami11 May
    • RE: Possible memory leak?Bruno Adami11 May
      • RE: Possible memory leak?Kevin Stevens11 May
  • RE: Possible memory leak?Bruno Adami11 May
    • RE: Possible memory leak?Mark Easton11 May
    • Re: Possible memory leak?Warren Young11 May