A google search for "ns-2 free packet" revealed the link below, which I
thought was
interesting and possibly relevant to you.  It has some suggestions for
freeing packets.
*How to scale your simulation to more nodes (500 nodes) and speed up it?*
http://www.cs.binghamton.edu/~kliu/research/ns2code/index.html#speedup


On Tue, Mar 24, 2009 at 8:00 PM, <fh...@c3sl.ufpr.br> wrote:

>
> I am simulating a protocol which I developed, and I wanted the simulation
> to end only when all my nodes are dead. Well, that is not really that fast
> to happen, and before I reach that point my memory ends and I get a
> bac_alloc error message.
>
> And here is the thing: I do alloc lots of packets with allocpkt, and I
> also always manage to free them with Packet::free(Packet *), but even when
> I free them, the memory usage don't even change ! And I am not
> overreacting when I say this, I made some experiments, and the average
> memory used when freeing all packet was exactly the same of when I did the
> same simulation withou freeing them.
>
>
> What do I need to do when I intend to have huge simulations, with like
> 15000 packets flying in the air? Using Packet::free didn't solve my
> problem. I even tried editing this function and inserting "free(pkt);" in
> its end, but it was in vain.
>
>
> Can someone please help me?
>
>
> Thanks,
>
> --
> Fernando Henrique Gielow - UFPR - NR2
> Computer Science undergraduate student.
>
>

Reply via email to