memory consumption in ns
Mon, 8 Sep 1997 11:34:26 -0700 (PDT)
On Mon, 8 Sep 1997, John Heidemann wrote:
> On Fri, 05 Sep 1997 18:42:54 PDT, Dennis Connors - Intern wrote:
> >I am using ns to simulate a trace driven video connection. I am
> >using the "Heap" scheduler. As the simulation progresses it
> >consumes swap memory until it runs out and dies. It gives the
> >message "Virtual Memory exceeded in 'new' ". My ns modifications
> >free all packets that they generate. I am getting the packet
> >interarrival times from a trace file using the "Traffic/Trace"
> >object. Does anyone know what could cause the swap memory to
> >continually decrease as the simulation progresses?
> I recommend you try using either Purify or dmalloc to see where
> your memory is going. Once you know that, you can verify that you're
> freeing all packets in your new code or that we're not freeing
> something in the ns core.
> Dmalloc usage for ns is described at
Or, you can use a new simple helper function to find out where's the
It will show the amount of stack/heap memory used from start-up to the
point this helper function is called. Called again. It will show the
amount of memory used from last call to this one.
To enable this, get the latest daily snapshot and compile it
with -DMEMDEBUG_SIMULATIONS DEFINE option set in your Makefile.