[xsd-users] memory not deallocated ?
frederic heem
frederic.heem at telsey.it
Mon Oct 31 04:21:11 EST 2005
Hi boris,
lid_conf.xsd and driver.cxx has been changed, only the attribute name is
optional.
When program is executed under the control of valgrind, it shows that some
memory hasn't been deallocated. I reckon this memory is allocated once for
the whole life of the program, so it may be NOT a memory leak. However, I do
prefer having a program which deallocate everything so that "real" memory
leak can be detected quicker.
[heefre at heefre lid_conf]$ valgrind --tool=memcheck --leak-check=full driver
lid_conf.xml
==12600== Memcheck, a memory error detector.
==12600== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==12600== Using LibVEX rev 1367, a library for dynamic binary translation.
==12600== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==12600== Using valgrind-3.0.1, a dynamic binary instrumentation framework.
==12600== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==12600== For more details, rerun with: -v
==12600==
card name = voicetronix, cardNumber = 0
port number = 0
port name = line1
port number = 1
port name = line2
card name = dialogic, cardNumber = 1
port number = 3
port name = line3
port number = 4
port name = line4
==12600==
==12600== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 32 from 4)
==12600== malloc/free: in use at exit: 2388 bytes in 63 blocks.
==12600== malloc/free: 1840 allocs, 1777 frees, 607290 bytes allocated.
==12600== For counts of detected errors, rerun with: -v
==12600== searching for pointers to 63 not-freed blocks.
==12600== checked 342308 bytes.
==12600==
==12600== 1620 bytes in 31 blocks are possibly lost in loss record 3 of 3
==12600== at 0x1B900C18: operator new(unsigned) (vg_replace_malloc.c:164)
==12600== by 0x1BCE6851: std::string::_Rep::_S_create(unsigned, unsigned,
std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.3)
==12600== by 0x1BCE8CD4: (within /usr/lib/libstdc++.so.6.0.3)
==12600== by 0x1BCE8DE1: std::string::string(char const*,
std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.3)
==12600== by 0x8060532: xsd::cxx::tree::type_factory_initializer<0l, char,
lid::LidLine>::type_factory_initializer(char const*)
(type-factory-map.hxx:124)
==12600== by 0x80519CE: __static_initialization_and_destruction_0(int, int)
(lid_conf.cxx:149)
==12600== by 0x8051A48: _GLOBAL__I__ZN3lid7LidLineC2ERKj (lid_conf.cxx:452)
==12600== by 0x80646D0:
(within /home/heefre/software/cti/cxx/tree/lid_conf/driver)
==12600== by 0x804A544:
(within /home/heefre/software/cti/cxx/tree/lid_conf/driver)
==12600== by 0x8064639: __libc_csu_init
(in /home/heefre/software/cti/cxx/tree/lid_conf/driver)
==12600== by 0x1BD71DD0: __libc_start_main (in /lib/tls/libc-2.3.5.so)
==12600== by 0x804AAA8:
(within /home/heefre/software/cti/cxx/tree/lid_conf/driver)
==12600==
==12600== LEAK SUMMARY:
==12600== definitely lost: 0 bytes in 0 blocks.
==12600== possibly lost: 1620 bytes in 31 blocks.
==12600== still reachable: 768 bytes in 32 blocks.
==12600== suppressed: 0 bytes in 0 blocks.
==12600== Reachable blocks (those to which a pointer was found) are not shown.
==12600== To see them, rerun with: --show-reachable=yes
--
***** ----- ***** ----- *****
Frederic Heem
Software Designer
R&D - Telsey SpA Telecommunications
Viale Industria, 1
31055 Quinto di Treviso (TV)
ITALY
Tel. direct phone: (+39) 0422 377819
Tel. (+39) 0422 377711
Fax. (+39) 0422 470920
website ==> www.telsey.it
PRIVACY AND CONFIDENTIALITY NOTICE
This email and any attachments are confidential and are intended for the
addressee only.
If you have received this message by mistake, please contact us immediately
and then
delete the message from your system. You must not copy, distribute, disclose
or act upon
the contents of this email.
More information about the xsd-users
mailing list