Hi Dears. I write new Mac Protocol for ns2 . I notice that with large number of nodes or heavy load , program run out of memory . I check Valgrind program to debug the program with 5 nodes to run faster . as you can see i have definitly lost in my program but the valgrind don't show the exact position of problem . it shows that the prolem is in function Packet:alloc() .
I have 1GB ram . I use Ns-2.34 . the simulation has 5 node and 100 random udp with rate of 15kb . Is anyone has suggestion about where the problem come from ? ==2565== 1,729,772 (493,120 direct, 1,236,652 indirect) bytes in 5,360 blocks are definitely lost in loss record 1,364 of 1,365 ==2565== at 0x4025390: operator new(unsigned int) (vg_replace_malloc.c:214) ==2565== by 0x81C4F54: Packet::alloc() (packet.h:687) ==2565== by 0x81C4FFA: Packet::copy() const (packet.h:753) ==2565== by 0x827C557: WirelessChannel::sendUp(Packet*, Phy*) (channel.cc:379) ==2565== by 0x827B44D: Channel::recv(Packet*, Handler*) (channel.cc:147) ==2565== by 0x82A9CB8: WirelessPhy::sendDown(Packet*) (wireless-phy.cc:306) ==2565== by 0x82A8168: Phy::recv(Packet*, Handler*) (phy.cc:122) ==2565== by 0x81BCA05: Connector::send(Packet*, Handler*) (connector.h:56) ==2565== by 0x82B257E: CMUTrace::recv(Packet*, Handler*) (cmu-trace.cc:1432) ==2565== by 0x838FA51: cfmm_mac::rtsJitterHandler() (CFMM.cc:528) ==2565== by 0x838FCEE: cfmm_mac::sendWaitHandler() (CFMM.cc:476) ==2565== by 0x838FD8F: cfmmSendWaitTimer::handle(Event*) (CFMM.cc:754)
