Overview
| Artifact ID: | 3b2a272902a10afce41090a55dc35a6b55c2500d |
|---|---|
| Ticket: | 2960042fffffffffffffffffffffffffffffffff
high water mark memory not shared for file I/O needs |
| User & Date: | blacksqr on 2010-02-27 08:24:47 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
When a string is converted to a list via the split command, the memory used by the list is never released, even if the list variable is unset, even if the conversion takes place in a procedure with no information returned. To see the leak, execute the following procedure: proc listleak {} { set line xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx for {set i 0} {$i < 2000000} {incr i} { append largeString $line\n } set largeList [split $largeString \n] unset largeString unset largeList return } =========================================================================== On my computer: % exec vmstat procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 18844 2134300 11572 433516 0 0 71 25 121 378 7 1 92 1 % listleak % exec vmstat procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 18844 1836432 11580 433516 0 0 71 25 121 378 7 1 92 1 A net loss of free memory of 297868 kB. The memory never comes back until the Tcl interpreter is exited. ActiveTcl 8.5.8 on Ubuntu Intrepid. - foundin changed to: "obsolete: 8.5.8"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "blacksqr"
- subsystem changed to: "42. Memory Preservation"
- title changed to: "conversion of string to list leaks memory"
- type changed to: "Bug"