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

Re: [ns] Memory conservation



>Hi,
>
>I'm trying to reduce simulation time by looking at techniques to reduce
>memory usage.
>
>I tried disabling unused packet headers in /ns/tcl/lib/ns-packet.tcl, but
>that didn't help a lot.
>
>Next thing I'm looking at is to do a delay_bind on the variables. I'd a
>look at tcp.{h,cc} and found a comment in the code that says "delay bound
>tracevars aren't yet supported". Does this statement still hold true (my
>snapshot is about 3 months old). Also, could anyone tell me what exact
>code changes need to be made to switch from bind() to delay_bind().
>
>Any other tips for speeding up the simulation r welcome.

Delay_bind should work with tracedvars now.  From ns-2's CHANGES.html:

	Delay binding for TCP TraceVar instance variables now works. (Requries
	an updated tclcl.) Code is under ifdef TCP_DELAY_BIND_ALL. Old
	TCP_DELAY_BIND ifdef's removed.
	[kkumar] Tue Dec 14 16:53:45 PST 1999

Although switching from binding to delay_binding is a good idea,
I'd encourage you to do a memory profile of your app (with dmalloc;
see the memory debugigng page) to make sure you're optimizing the
right place.

   -John Heidemann