Artifacts Associated With Ticket 1464731
Ticket change [868085e1ae] (rid 131519) by nobody on 2006-04-05 07:23:48:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi, It seems there is memory leak in Thread release call. I have attched the sample script for Theread "create/release". For each thread release there was around 65KB of memory leak. More over if I provide any package in Thread send call the leak was pretty much high(400KB).So please have look into this issue and suggest me a solution. OS : Windows 2000 Thanks, Karthik Email:[email protected] - foundin initialized to: "obsolete: 8.4.13"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "49. Threading"
- title initialized to: "Memory leak in Thread release"
- type initialized to: "Bug"
Ticket change [8e25c527e9] (rid 120061) by dkf on 2006-04-05 17:30:57:
- assignee changed to: "vasiljevic"
- subsystem changed to: "80. Thread Package"
Ticket change [4fb6ba3950] (rid 125871) by nobody on 2006-04-06 00:02:10:
- icomment:
Logged In: NO I have written a sample script in which I have provided tcltest package in thread send call. Each thread consumes 800KB of memory , but while release only 75KB of memory is released.Please find the sample script below. package require Thread array set ::NewThread {} set ::mcount 10 after 4000 # Program Mem-Usage here is 2260K for {set count 1} {$count < $::mcount} {incr count} { set ::NewThread($count) [thread::create -joinable { thread::wait }] puts "Created Thread NewThread($count): $::NewThread ($count)" for {set cnt 1} {$cnt < 100 } {incr cnt} { thread::send $::NewThread($count) { package require tcltest puts "xxxxxxxxxxxxxxhello worldxxxxxxxxxxxxxxxxxx" } } } after 4000 # Program Mem-Usage here is 9880K for {set count 1} {$count < $::mcount} {incr count} { thread::release $::NewThread($count) puts "Released Thread NewThread($count) : $::NewThread ($count)" thread::join $::NewThread($count) puts "NewThread($count) Thread Terminated" } puts "Quiting............" # Program Mem-Usage here is 9180K after 4000 - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [d13fad20d2] (rid 113317) by vasiljevic on 2007-06-30 21:59:39:
- closedate changed to: "2007-06-30T14:59:39"
- closer changed to: "vasiljevic"
- icomment:
Logged In: YES user_id=95086 Originator: NO The problem is that you are creating threads with "-joinable" but you never join them. Instead you "thread::release" them. Either skip "-joinable" or use "thread::join" to collect the exiting thread. I agree that it is not clear when to call what and this has something to do with the history. I will try to simplify the API and remove some commands out of it to make it more easier to use. Yet, I will have to wait for 3.0 to do that.
- login: "vasiljevic"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"
- username: "vasiljevic"