| jerry.levan@gmail.com 2007-04-24, 8:08 am |
| On Apr 24, 6:51 am, Ivan Young <i...@jet.uk> wrote:
> jerry.le...@gmail.com wrote:
>
>
>
> The memory leak seems isolated to the channel configuration requests from the generic layer.
> Using the old udp_conf command works without leaking.
>
> # Here is my current hacked version of sendTime, I've #'d my tracing lines.
> proc sendTime { sock } {
> # memory trace on
> set data [read $sock]
> if { [string length $data] > 0} {
> set peer [fconfigure $sock -peer]
> # puts "peer $peer"
> # memory tag interest
> # Try udp_conf instead of fconfigure
> # fconfigure $sock -remote $peer
> udp_conf $sock [lindex $peer 0] [lindex $peer 1]
> #memory active active-mem.txt
> #memory tag {}
> puts -nonewline $sock "[clock format [clock seconds ] -format %X ]"
> # puts "[string length $data] $data [clock format [clock seconds ] -format %X ]"
> #puts "[string length $data] $data "
> }
> #puts [memory info]
> return
>
> }
>
> This would seem to point to udpSetOption code.
> I tested the above on Solaris 7 tcl 8.4.14, tcludp 1.0.8 patch with HEAD CVS code, can anyone
> confirm the above works on other platforms ?
>
> Ivan...
Ivan,
I am running about 20 clients against the server ( one call per second
for each client) and your "fix"
appears to be the cure for the memory leak!
I am running Fedora 6 with the latest ActiveState Tcl on a HP laptop.
I guess I have to figure out how to use cvs to grab the patch that
fixes the excessive cpu usage...
Thanks for running down the problem :)
Jerry
|