Overview
| Artifact ID: | 1e77b13af56cd87b66fe6561d34f5ac13809abda |
|---|---|
| Ticket: | 617588ffffffffffffffffffffffffffffffffff
memory leak |
| User & Date: | karel_janacek on 2002-10-02 14:48:03 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
Hello, I am afraid, we found a memory leak bug. We use Linux RH 7.1, Tcl 8.4.0 (8.3.3). When we run the test script #!/bin/sh #test \ exec wish8.4 "$0" "$@" wm iconify . global q array set ::q {} bell after 5000 for {set i 0} {$i < 100000} {incr i} { set ::q($i) $i } bell after 5000 array unset ::q bell after 5000 exit and inspect the memory using the command "ps xv|grep wish" after each bell (not by TCL_MEM_DEBUG), it looks that memory is not deallocated by array unset. VSZ RSS 3901 pts/0 S 0:00 731 2 4689 2752 1.4 wish8.4 ./test.tcl 3901 pts/0 S 0:01 731 2 15821 13896 7.2 wish8.4 ./test.tcl 3901 pts/0 S 0:02 731 2 15561 13636 7.1 wish8.4 ./test.tcl When we change the script (variable -> constant) for {set i 0} {$i < 100000} {incr i} { set ::q($i) 1 } or (variable -> another variable with constant value) set j 1 for {set i 0} {$i < 100000} {incr i} { set ::q($i) $j } it looks ok. VSZ RSS 3914 pts/0 S 0:00 731 2 4689 2752 1.4 wish8.4 ./test.tcl 3914 pts/0 S 0:01 731 2 11909 9984 5.2 wish8.4 ./test.tcl 3914 pts/0 S 0:01 731 2 4689 2764 1.4 wish8.4 ./test.tcl Next, when we use .. [array get ::q] memory is not deallocated too. Sorry fo my english. Best regards. Karel Janacek - foundin changed to: "obsolete: 8.4.0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "karel_janacek"
- subsystem changed to: "41. Memory Allocation"
- title changed to: "memory leak"
- type changed to: "Bug"