From: <no...@so...> - 2002-08-08 18:47:31
|
Bugs item #587488, was opened at 2002-07-27 15:58 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=587488&group_id=10894 Category: 39. Memory Allocation Group: 8.4b2 Status: Closed Resolution: Fixed Priority: 8 Submitted By: miguel sofer (msofer) Assigned to: miguel sofer (msofer) Summary: leak with the new thread allocator Initial Comment: Reported on clt by Sven Sass on clt: http://groups.google.com/groups?dq=&start=25&hl=en&lr=&ie=UTF-8&group=comp.lang.tcl&selm=88d0b923.0207260455.4e4f3da9%40posting.google.com http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&group=comp.lang.tcl&selm=ahrscj%24290%2402%241%40news.t-online.com The problem is: when compiling with both -DTCL_THREADS -DUSE_THREAD_ALLOC the following script (typed at the tclsh prompt) leaks massively for { set i 0 } { $i < 100000 } {incr i} { lappend a "" unset a } Replacing [lappend] with [append] or [unset a] with [set a {}] stops the leak; compiling with the previous allocator stops it too. I confirmed the problem on linux, with the HEAD as of 2002-04-24 - i.e., just after the commit of the new allocator and before releasing tcl8.4b1. ---------------------------------------------------------------------- >Comment By: miguel sofer (msofer) Date: 2002-08-08 15:47 Message: Logged In: YES user_id=148712 Note: no test added, the leak was already exercised by the testsuite (creating object with lappend), so that purify should pick it up. ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2002-08-07 11:27 Message: Logged In: YES user_id=148712 Fixed in HEAD - generic/tclObj.c (Tcl_NewObj) was missing the special code for USE_THREAD_ALLOC, and was thus allocating the object in a list that would never be freed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=587488&group_id=10894 |