[ndnSIM] How to calculate size of Interest/Data packet

Junxiao Shi shijunxiao at email.arizona.edu
Tue May 10 16:32:36 PDT 2016


Hi Anil

This stack trace does not indicate DeadNonceList has a memory leak.
DeadNonceList::makeEntry invokes Name::wireEncode, which causes the
Interest name to allocate new buffer. If the Interest name is retained
somewhere, this memory is not released.
NDNOPS has observed a NameTree entry leak
<http://redmine.named-data.net/issues/3619> on the testbed, which may be
related to this.

Yours, Junxiao

On Sun, May 8, 2016 at 11:46 PM, Anil Jangam <anilj.mailing at gmail.com>
wrote:

> Alex,
>
> The reason I was trying to find an alternative because this 'wireEncode()'
> code path is one of the major memory consumer in ndnSIM. Although there are
> optimizations provided by caching the block size after first encode(), it
> appears that memory is not freed after first encode.
>
> ==9587== 100,926,144 bytes in 73,852 blocks are still reachable in loss
> record 1,226 of 1,228
> ==9587==    at 0x4C2B0E0: operator new(unsigned long) (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==9587==    by 0x69A08DF: allocate (new_allocator.h:104)
> ==9587==    by 0x69A08DF: _M_allocate (stl_vector.h:168)
> ==9587==    by 0x69A08DF: void std::vector<ndn::Block,
> std::allocator<ndn::Block> >::_M_emplace_back_aux<ndn::Block>(ndn::Block&&)
> (vector.tcc:404)
> ==9587==    by 0x699C79C: emplace_back<ndn::Block> (vector.tcc:101)
> ==9587==    by 0x699C79C: push_back (stl_vector.h:920)
> ==9587==    by 0x699C79C: ndn::Block::parse() const (block.cpp:347)
> ==9587==    by 0x6A1F5A8: ndn::Name::wireEncode() const (name.cpp:102)
> ==9587==    by 0x6B4619F: nfd::DeadNonceList::makeEntry(ndn::Name const&,
> unsigned int) (dead-nonce-list.cpp:108)
> ==9587==    by 0x6B4621D: nfd::DeadNonceList::has(ndn::Name const&,
> unsigned int) const (dead-nonce-list.cpp:92)
> ==9587==    by 0x6B25A42: nfd::Forwarder::onIncomingInterest(nfd::Face&,
> ndn::Interest const&) (forwarder.cpp:86)
> ==9587==    by 0x69B066A: operator() (functional:2471)
> ==9587==    by 0x69B066A: operator() (signal-signal.hpp:241)
> ==9587==    by 0x69B066A: operator() (signal-signal.hpp:255)
> ==9587==    by 0x69B066A: emit_onReceiveInterest<ndn::Interest,
> ndn::util::signal::DummyExtraArg> (face.hpp:194)
> ==9587==    by 0x69B066A:
> ndn::Face::Impl::asyncExpressInterest(std::shared_ptr<ndn::Interest const>
> const&, std::function<void (ndn::Interest const&, ndn::Data&)> const&,
> std::function<void (ndn::Interest const&)> const&) (face-impl.hpp:170)
> ==9587==    by 0x69AD13B: operator() (face.cpp:69)
> ==9587==    by 0x69AD13B: std::_Function_handler<void (),
> ndn::Face::expressInterest(ndn::Interest const&, std::function<void
> (ndn::Interest const&, ndn::Data&)> const&, std::function<void
> (ndn::Interest const&)> const&)::{lambda()#1}>::_M_invoke(std::_Any_data
> const&) (functional:2071)
> ==9587==    by 0xB84EC6C: ns3::DefaultSimulatorImpl::ProcessOneEvent()
> (default-simulator-impl.cc:149)
>
>
> /anil.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160510/59285412/attachment.html>


More information about the ndnSIM mailing list