[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leak in ns?



Hello again!

Sorry about the possible duplicate of my previous message. There seems
to be some problems with sending mail to ns-users.

> I just noticed that I ran out of memory when running a long (86 400
> seconds) HTTP simulation. Memory consumption was about 1500MB when my
> simulation crashed. I don't think that the problem is my HTTP generator
> (although it is implemented in Otcl), because this behavior occurs only
> when I have a LAN in my topology:

I think I have solved this problem. I replaced the following line in mac.cc
(in void Mac::sendUp(Packet* p), to be exact):  

free(p);

with this:

Packet::free(p);

Now the memory consumption in my simulation dropped from 1500MB to less
that 1MB.

-Jani