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

Re: [ns] memory leaks



>  I'm trying to track down some memory leaks in ns-2.1b8 using dmalloc.
>The largest memory leaker according to dmalloc_summarize.pl is
>ra=0x81c4e4a, leaking 33664 objects for a total of 1509708 bytes of
>memory.  According to ra_info.pl, 0x81c4e4a is identified as
>
>	Address = '0x81c4e4a' line 21 num 1
>	0x81c4e4a <TclpAlloc+30>:	0xc9e85d8b
>	Line 124 of "gen/ptypes.cc" starts at address 0x815a9f4
>	<_GLOBAL_$I$et_ns_ptypes+24>
>	   and ends at 0x8282043 <__11EmbeddedTclPCc+3>.
>
>Line 124 of gen/ptypes.cc is the last line:
>
>	EmbeddedTcl et_ns_ptypes(code);
>
>  Does anyone have an idea of what dmalloc is trying to tell me here?  Are
>these leaks mainly in OTcl?

That's the source code to all the Tcl files that is compiled into ns.
It is not a leak.

(Although, to be fair, there may be two copies of that array in
memory, one in read-only memory and one in the heap. :-( )

[That said, you're using a good approach to track down memory leaks.
This is basically what we do when we have a problem.]

   -John Heidemann