Anas,

You are facing a memory leak. The effect of memory leak aggravated when you
run longer simulation time, simulating larger number of nodes or both.

Valgrind is good for memory leak detection. It able to show the functions
and exact lines of codes that potentially causing some of the memory leaks.
In case you have no experience using Valgrind, do spend some time on
internet to learn how to setup and test using Valgrind, it has ample of
information on this.

NS2 does not have automatic garbage collection, thus warrants a manual
freeing of allocated memory once an object is no longer needed.

Good Luck.

rgds
Saravanan K

On Sun, May 12, 2013 at 6:24 PM, Anas Almajali <almaj...@usc.edu> wrote:

>
> All,
>
> I ported GPSR implementation to ns-2 2.34. The examples that come with the
> implementation work fine.
> Some of my simulations that have small number of nodes or few events
> happening work fine too. However, when I increase the number of nodes above
> 100 nodes and have more events, the simulation runs for a while then
> aborts. I was checking the memory while running the cases that fail and
> found that these simulations are consume the whole memory on my machine and
> off course abort after that. I have 8GB of memory! The same simulations
> work fine with other routing protocols like AODV and the memory consumption
> is within limits.
>
> Does anyone know were does GPSR goes wrong and consumes the memory? and is
> there a fix for that?
>
> Anas
>

Reply via email to