Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <4098E1A0.70108@x-ray.at> Date: Wed, 05 May 2004 14:44:16 +0200 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7b) Gecko/20040421 MultiZilla/1.5.0.4h MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: pthreads and sockets - Cannot register window class error References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hornet.mur.at X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-IsSubscribed: yes Arash Partow schrieb: > I can't replicate your problem, but I know where it is coming from, > basically standard windows winsock is not geared up to handle that man > socket connections. When a socket is made and then closed the socket > actually stays open for about 240-300 seconds depending on your > registry settings, this is so that winsock can make sure the > connection has been properly closed off. > > Whilst this 240-300 seconds is passing by the socket is actually still > alive meaning the memory it occupies is still valid, its not until the > 240 seconds has passed does winsock go and clean up the instance of > the socket. > > what you are seeing is that basically as you run your program more and > more times, you are creating sockets in memory, every time the socket > is closed YOU think that the socket is cleaned up but its not, and so > you basically loose a bit of memory until the timeout for the socket > has occurred, i guess through debugging where you run and re-run your > test app you have run out of RAM so you see these errors. > > this explains the whole thing: > http://www.winguides.com/registry/display.php/878/ $ regtool -i set "/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/TcpTimedWaitDelay" 30 But we already found out that the culprit was Norton Firewall, closing your socket, wasn't it? -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/