[ns] Help regarding absurd memory usage
james at bernsen.us
Wed Mar 25 19:45:14 PDT 2009
A google search for "ns-2 free packet" revealed the link below, which I
interesting and possibly relevant to you. It has some suggestions for
*How to scale your simulation to more nodes (500 nodes) and speed up it?*
On Tue, Mar 24, 2009 at 8:00 PM, <fhg07 at 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?
> Fernando Henrique Gielow - UFPR - NR2
> Computer Science undergraduate student.
More information about the Ns-users