<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear ndnSIM friends,<div class=""><br class=""></div><div class="">I ran valgrind on ndn-simple and I found this much memory leak, I wanted to ask if this is normal?</div><div class=""><br class=""></div><div class="">marzieh@marzieh-VirtualBox:~/ndnSIM/ns-3$ ./waf --run=ndn-simple --command-template="valgrind --leak-check=yes %s"<br class="">Waf: Entering directory `/home/marzieh/ndnSIM/ns-3/build'<br class="">Waf: Leaving directory `/home/marzieh/ndnSIM/ns-3/build'<br class="">Build commands will be stored in build/compile_commands.json<br class="">'build' finished successfully (2.754s)<br class="">==6205== Memcheck, a memory error detector<br class="">==6205== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.<br class="">==6205== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info<br class="">==6205== Command: /home/marzieh/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-ndn-simple-debug<br class="">==6205== <br class="">==6205== <br class="">==6205== HEAP SUMMARY:<br class="">==6205==     in use at exit: 13,963 bytes in 226 blocks<br class="">==6205==   total heap usage: 152,768 allocs, 152,542 frees, 15,931,040 bytes allocated<br class="">==6205== <br class="">==6205== 2,136 (344 direct, 1,792 indirect) bytes in 1 blocks are definitely lost in loss record 115 of 118<br class="">==6205==    at 0x402E89C: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)<br class="">==6205==    by 0x64B31CB: ns3::TypeId ns3::TypeId::AddConstructor<ns3::ndn::Producer>()::Maker::Create() (type-id.h:596)<br class="">==6205==    by 0x40A90A5: ns3::FunctorCallbackImpl<ns3::ObjectBase* (*)(), ns3::ObjectBase*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()() (callback.h:260)<br class="">==6205==    by 0x91E6B41: ns3::Callback<ns3::ObjectBase*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()() const (callback.h:1092)<br class="">==6205==    by 0x95A0907: ns3::ObjectFactory::Create() const (<a href="http://object-factory.cc:99" class="">object-factory.cc:99</a>)<br class="">==6205==    by 0x64B8CC7: ns3::Ptr<ns3::Application> ns3::ObjectFactory::Create<ns3::Application>() const (object-factory.h:200)<br class="">==6205==    by 0x64B8070: ns3::ndn::AppHelper::InstallPriv(ns3::Ptr<ns3::Node>) (ndn-app-helper.cpp:94)<br class="">==6205==    by 0x64B7C39: ns3::ndn::AppHelper::Install(ns3::Ptr<ns3::Node>) (ndn-app-helper.cpp:57)<br class="">==6205==    by 0x80517CD: ns3::main(int, char**) (ndn-simple.cpp:92)<br class="">==6205==    by 0x8051D2F: main (ndn-simple.cpp:107)<br class="">==6205== <br class="">==6205== 3,192 (464 direct, 2,728 indirect) bytes in 1 blocks are definitely lost in loss record 117 of 118<br class="">==6205==    at 0x402E89C: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)<br class="">==6205==    by 0x6487F8C: ns3::TypeId ns3::TypeId::AddConstructor<ns3::ndn::ConsumerCbr>()::Maker::Create() (type-id.h:596)<br class="">==6205==    by 0x40A90A5: ns3::FunctorCallbackImpl<ns3::ObjectBase* (*)(), ns3::ObjectBase*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()() (callback.h:260)<br class="">==6205==    by 0x91E6B41: ns3::Callback<ns3::ObjectBase*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator()() const (callback.h:1092)<br class="">==6205==    by 0x95A0907: ns3::ObjectFactory::Create() const (<a href="http://object-factory.cc:99" class="">object-factory.cc:99</a>)<br class="">==6205==    by 0x64B8CC7: ns3::Ptr<ns3::Application> ns3::ObjectFactory::Create<ns3::Application>() const (object-factory.h:200)<br class="">==6205==    by 0x64B8070: ns3::ndn::AppHelper::InstallPriv(ns3::Ptr<ns3::Node>) (ndn-app-helper.cpp:94)<br class="">==6205==    by 0x64B7C39: ns3::ndn::AppHelper::Install(ns3::Ptr<ns3::Node>) (ndn-app-helper.cpp:57)<br class="">==6205==    by 0x80515A1: ns3::main(int, char**) (ndn-simple.cpp:85)<br class="">==6205==    by 0x8051D2F: main (ndn-simple.cpp:107)<br class="">==6205== <br class="">==6205== 8,115 (552 direct, 7,563 indirect) bytes in 6 blocks are definitely lost in loss record 118 of 118<br class="">==6205==    at 0x402E89C: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)<br class="">==6205==    by 0x6A1ADBB: __gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, (__gnu_cxx::_Lock_policy)2> >::allocate(unsigned int, void const*) (new_allocator.h:104)<br class="">==6205==    by 0x6A1AC1C: std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, (__gnu_cxx::_Lock_policy)2> > >::allocate(std::allocator<std::_Sp_counted_ptr_inplace<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, (__gnu_cxx::_Lock_policy)2> >&, unsigned int) (alloc_traits.h:416)<br class="">==6205==    by 0x6A1A9A5: std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, (__gnu_cxx::_Lock_policy)2> > > std::__allocate_guarded<std::allocator<std::_Sp_counted_ptr_inplace<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, (__gnu_cxx::_Lock_policy)2> > >(std::allocator<std::_Sp_counted_ptr_inplace<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, (__gnu_cxx::_Lock_policy)2> >&) (allocated_ptr.h:103)<br class="">==6205==    by 0x6A1A7EB: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, ndn::Interest const&>(std::_Sp_make_shared_tag, nfd::pit::Entry*, std::allocator<nfd::pit::Entry> const&, ndn::Interest const&) (shared_ptr_base.h:613)<br class="">==6205==    by 0x6A1A725: std::__shared_ptr<nfd::pit::Entry, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<nfd::pit::Entry>, ndn::Interest const&>(std::_Sp_make_shared_tag, std::allocator<nfd::pit::Entry> const&, ndn::Interest const&) (shared_ptr_base.h:1100)<br class="">==6205==    by 0x6A1A697: std::shared_ptr<nfd::pit::Entry>::shared_ptr<std::allocator<nfd::pit::Entry>, ndn::Interest const&>(std::_Sp_make_shared_tag, std::allocator<nfd::pit::Entry> const&, ndn::Interest const&) (shared_ptr.h:319)<br class="">==6205==    by 0x6A1A613: std::shared_ptr<nfd::pit::Entry> std::allocate_shared<nfd::pit::Entry, std::allocator<nfd::pit::Entry>, ndn::Interest const&>(std::allocator<nfd::pit::Entry> const&, ndn::Interest const&) (shared_ptr.h:620)<br class="">==6205==    by 0x6A1A4A7: std::shared_ptr<nfd::pit::Entry> std::make_shared<nfd::pit::Entry, ndn::Interest const&>(ndn::Interest const&) (shared_ptr.h:636)<br class="">==6205==    by 0x6A19742: nfd::pit::Pit::findOrInsert(ndn::Interest const&, bool) (pit.cpp:81)<br class="">==6205==    by 0x697469B: nfd::pit::Pit::insert(ndn::Interest const&) (pit.hpp:78)<br class="">==6205==    by 0x696BFCB: nfd::Forwarder::onIncomingInterest(nfd::face::Face&, ndn::Interest const&) (forwarder.cpp:147)<br class="">==6205== <br class="">==6205== LEAK SUMMARY:<br class="">==6205==    definitely lost: 1,360 bytes in 8 blocks<br class="">==6205==    indirectly lost: 12,083 bytes in 210 blocks<br class="">==6205==      possibly lost: 0 bytes in 0 blocks<br class="">==6205==    still reachable: 520 bytes in 8 blocks<br class="">==6205==         suppressed: 0 bytes in 0 blocks<br class="">==6205== Reachable blocks (those to which a pointer was found) are not shown.<br class="">==6205== To see them, rerun with: --leak-check=full --show-leak-kinds=all<br class="">==6205== <br class="">==6205== For counts of detected and suppressed errors, rerun with: -v<br class="">==6205== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)</div></body></html>