Overview
| Artifact ID: | 66a7c28320930fd531b18680675372179de3ac38 |
|---|---|
| Ticket: | 2874678fffffffffffffffffffffffffffffffff
dict incr leaks |
| User & Date: | wastl-nagel on 2009-10-08 12:35:15 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
If a dict is created and filled via "dict incr" with a bigger set of keys it seems to leak. If the dict is destroyed (unset or overwritten) a lot of memory still keeps allocated. The following code consumes approx. 500MB memory on my machine (Linux, 64-bit): set chars {a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9} for {set i 0} {$i < 1000} {incr i} { append prefix [lindex $chars [expr int([tcl::mathfunc::rand]*62)]] set dictionary [dict create] foreach char $chars { foreach c $chars { dict incr dictionary $prefix$char$c $i } } } I've tested Tcl 8.5.2 (OpenSuSE 11.0, x86_64), 8.5.7, 8.6b1 (both built from source), all three leak, cf. attached valgrind log files for same code but only 100 cycles. For 8.5.2 TclBN_mp_init_size according to valgrind seems to be reason. % uname -mrvs Linux 2.6.25.20-0.5-default #1 SMP 2009-08-14 01:48:11 +0200 x86_64 - foundin changed to: "obsolete: 8.5.7"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "wastl-nagel"
- subsystem changed to: "15. Dict Object"
- title changed to: "dict incr leaks"
- type changed to: "Bug"