From: joerg <jo...@0n...> - 2004-06-26 08:06:50
|
hi, i hope, i have not a wrong understanding of the tcl-thread functionality -- the follow example show my problem. TEST-SCRIPT >> package require Tcl 8.4 package require Thread 2.5 set ::testThread { puts "alive $::cnt == [thread::id] -> [llength [thread::names]]" after 5000 "puts $::cnt; thread::release" } for {set ni 0} {$ni < 1000} {incr ni} { set thid [thread::create "set ::cnt $ni; $::testThread; thread::wait"] after 20 } vwait forever << tclsh starts with 1.7MB memory ... PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND 11859 pts/16 S 0:00 0 1 12978 1716 0.3 tclsh test-script.tcl and at the end of run ... tclsh use 38MB memory !? 11859 pts/16 S 0:00 0 1 89514 39896 7.7 tclsh test-script.tcl how can i free/flush the memory, or is this a bug/memleak in tcl ? i observe this behavior on follow system enviroments: linux 2.6.7 - i686/ia64/ppc solaris 8/9 win32 - i386 with tcl8.4.6/thread2.5.2 & cvs-snap@20040625 (tcl/thread) - thanks for your help - regards, joerg |