[Xotcl] memory leak analysis

Gustaf Neumann neumann at wu-wien.ac.at
Fri Sep 30 19:28:06 CEST 2005



-------- Original-Nachricht --------
Betreff: 	Re: [Xotcl] memory leak analysis
Datum: 	Fri, 30 Sep 2005 19:25:52 +0200
Von: 	Gustaf Neumann <neumann at wu-wien.ac.at>
An: 	Ben Thomasson <ben.thomasson at gmail.com>
Referenzen: 	<44eb229c0509300852m10e879a7k at mail.gmail.com>



Ben Thomasson schrieb:

> Hi,
>
> I am writing a simulation engine using xotcl.   I have noticed as I 
> create and destroy objects over time this process will use all 
> available memory.  I have tracked down and eliminated old objects.

what do you mean by "old objects"?

> With the object count staying roughly constant the memory continues to 
> increase at about 1k per second.  What tools or tricks are useful for 
> tracking down memory leaks in Tcl or XOTcl?

are you using theads?

If something is leaking memory it is most likely more complicated than 
just object creation
and destruction. At least on my system the following script runs without 
any leaks.

for {set i 1} {$i < 10000000} {incr i} {
 set o [Object create obj-$i]
 $o destroy
}

can it be that you are somewhere building a table (assoc. array)
with object names?

xotcl has a bunch of compile flags to report memory usage, one can compile
tcl with a flag  that enables a command for memory checking.

-gustaf

>
> Thanks,
>
> Ben
>
> -- 
> You know you have reached perfection of design not when you have 
> nothing more to add, but when you have nothing more to take away. 
> --Antoine de Saint Exupéry
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Xotcl mailing list
>Xotcl at alice.wu-wien.ac.at
>http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
>  
>




More information about the Xotcl mailing list