Re: [ns] memory leak because of payload allocation

2010-11-27 Thread Sidney Doria
Get out of trouble. Use Valgrind. Sidney Doria UFCG / BRAZIL 2010/11/26 avinash chaurasia avinash.aviank2...@gmail.com: hello all, I have written following lines of code in UDP to transfer mien data over network, but when i run script it eats up all my 3gb memory and 5gb swap too with

Re: [ns] memory leak because of payload allocation

2010-11-27 Thread avinash chaurasia
thanks, i will try that. But still i need to clarify one thing Is it wrong to allocate PacketData in UDP layer using following command *PacketData *pd=new PacketData(1000); packet-setdata(pd);* if it is wrong then how user send his own data from sender side to receiver side. I searched alot but

[ns] memory leak because of payload allocation

2010-11-25 Thread avinash chaurasia
hello all, I have written following lines of code in UDP to transfer mien data over network, but when i run script it eats up all my 3gb memory and 5gb swap too with actual data of size around 16 mb. code in udp layer: *p-allocdata(len);* * **((PacketData*)(p-userdata()))-setData(readbuf);* Can