Overview
| Artifact ID: | 056ea5022207e63ff8f5a2fe091562d663dcd935 |
|---|---|
| Ticket: | 3493120fffffffffffffffffffffffffffffffff
Thread extension, memory leak after thread exit |
| User & Date: | sebres on 2012-02-24 13:33:32 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
Version: 8.5.11 (original and current core-8-5-branch) Platform: Windows (linux not yet tested) After exiting of threads, they leave a memory leak. Consequence of that: we cannot use techniques such as 'idletime' (to release some system resources, for example large tcl codes are no more used, etc, etc.). After run of following script I have lost 100MB of memory. In fact, nothing will be done here, except threads are created and exited. Test script: # for test purposes - to wait for threads exited : tsv::set testth count 0 # this create once a thread pool, and generate jobs : proc test {} { # create a thread pool if not yet already exists : if {![llength [tpool::names]]} { tpool::create -minworkers 0 -maxworkers 5 -idletime 1 -initcmd { # + 1 thread tsv::set testth count [expr {[tsv::get testth count] + 1}]; puts [thread::id]init!!!!! } -exitcmd { # - 1 thread tsv::set testth count [expr {[tsv::get testth count] - 1}]; puts [thread::id]!!!!!exit } } # generate jobs until 5 threads are created : while {[tsv::get testth count] < 5} { tpool::post -detached -nowait [lindex [tpool::names] 0] { puts [thread::id]!!job; tsv::array unset testthcount [thread::id] } update } } # repeat test 100 times, in addition waiting for the # threads to be finished each iteration : time {test; while {[tsv::get testth count]} {after 10};} 100 - foundin changed to: "obsolete: 8.5.11"
- is_private changed to: "0"
- priority changed to: "7 High"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "sebres"
- subsystem changed to: "49. Threading"
- title changed to: "Thread extension, memory leak after threa exit"
- type changed to: "Bug"