Hello,
I'm wondering if there is a problem with memory releasing in "array unset". The example below shows that ~130 Mb are still allocated after [array unset].
This is a real problem for me. I run a threaded app, and the memory gets increased by 50 Mb for each job done, although I unset/array unset ALL variables. As I have 3000 jobs to do, the computer memory crashes...
Is this a bug ?
Thanks !
Luc
ena_Agents_> ~/tcl8.6.4/luinst/bin/tclsh
% memory info
total mallocs 28562
total frees 20271
current packets allocated 8291
current bytes allocated 468387
maximum packets allocated 8478
maximum bytes allocated 486780
% for {set i 0} {$i < 1000} {incr i} {
for {set j 0} {$j < 1000} {incr j} {
for {set k 0} {$k < 10} {incr k} {
set T($i,$j,$k) [list $i $j $k]
}
}
}
% memory info
total mallocs 177036569
total frees 47028199
current packets allocated 130008370
current bytes allocated
4687928171
maximum packets allocated 130008401
maximum bytes allocated
4687931240
% array unset T *
% unset T
% update
% memory info
total mallocs 177037648
total frees 177029206
current packets allocated 8442
current bytes allocated 134684863
maximum packets allocated 130008437
maximum bytes allocated
4687932230
% exit