View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] memory leak analysis

From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Fri, 30 Sep 2005 19:28:06 +0200

-------- 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
>
>