[Ns-developers] Memory leak in Wifi Qos
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Tue May 19 07:27:26 PDT 2009
On Sun, 2009-05-17 at 19:36 +0200, Mirko Banchi wrote:
> Hi all,
>
> seems that a memory leak occurs when qos wifi objects are used. In
> particular this involves EdcaTxopN object. This can be obtained with the
> script example/simple-wifi-frame-aggregation.cc
> Valgrind output is:
>
> 40,732 (1,496 direct, 39,236 indirect) bytes in 11 blocks are definitely
> lost in loss record 72 of 76
> ==11519== at 0x4023554: operator new(unsigned int)
> (vg_replace_malloc.c:224)
> ==11519== by 0x479E4D2: ns3::TypeId
> ns3::TypeId::AddConstructor<ns3::EdcaTxopN>()::Maker::Create()
> (type-id.h:429)
> ==11519== by 0x439442D: 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:179)
> ==11519== by 0x43E371E: 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:420)
> ==11519== by 0x43E2DC2: ns3::ObjectFactory::Create() const
> (object-factory.cc:69)
> ==11519== by 0x47DD9E8: ns3::Ptr<ns3::EdcaTxopN>
> ns3::ObjectFactory::Create<ns3::EdcaTxopN>() const (object-factory.h:110)
> ==11519== by 0x47D9132: ns3::QosWifiMacHelper::Create() const
> (qos-wifi-mac-helper.cc:144)
> ==11519== by 0x47B171D: ns3::WifiHelper::Install(ns3::WifiPhyHelper
> const&, ns3::WifiMacHelper const&, ns3::NodeContainer) const
> (wifi-helper.cc:92)
> ==11519== by 0x80511E6: main (test.cc:79)
>
> Valgrind indicates that the lost bytes are istantiated in type-id.h but
> i can't understand the reason. Any idea?
Maybe your program crashes before the global static destructors of
libns3.so are called ?
Mathieu
More information about the Ns-developers
mailing list