For Programmers: Free Programming Magazines  


Home > Archive > Tcl > April 2007 > Re: Tcl UDP Server memory leak.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Tcl UDP Server memory leak.
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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com