X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <13010714.post@talk.nabble.com> Date: Tue, 2 Oct 2007 17:07:48 -0700 (PDT) From: wimxa To: cygwin AT cygwin DOT com Subject: Re: Huge memory leak, probably related to making new processes In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: wimxa AT yahoo DOT com References: <13006193 DOT post AT talk DOT nabble DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 > How do you know it is leaking memory? If you are looking at Windows Task Manager or some similar program, then you're probably just being misled. The OS will automatically free the memory from each "echo" process after it terminates, but it may not always immediately report it as available. -Lewis < Yes, I am using Windows Task Manager. Actually, it is leaking. I discovered the leak when I had like 10 programs running when I started a simple find just like the ones I posted. I searched a big collection of files (several tens of MB). After a while, I noticed it still didn't finish (I expected it to be done at the time) and that my computer is behaving somewhat strangely. I started closing one program at the time, but that was quite slow and getting worse. Then I noticed that HDD led was on most of the time. I launched Task Manager and it showed that my memory is <15MB (on a 2GB machine). I was assuming (with the programs launched) that around 1GB or so would be free - well, it was not. I restarted the machine, ~1.5GB free. All after that is history (i.e. I performed the tests from my previous post and I got the offender). Does this sound as a reasonable test to you? Anyway, can I ask you to do this yourself - just do the last test: COUNTER=1 while [ $COUNTER -lt 123456 ]; do (echo $COUNTER); let COUNTER=$COUNTER+1; done and wait a little (couple of minutes). If necessary, repeat it until your memory drops to 10-20 MB range and your HDD should start whining. Then close cygwin and wait 10 minutes. The memory is still "occupied". I don't know when Windows would free it, but I did not get that behavior with any other program (e.g. try to open & close Firefox or such - it will show a peak in both directions regarding memory and will do that almost immediately). Thanks for the note. -- View this message in context: http://www.nabble.com/Huge-memory-leak%2C-probably-related-to-making-new-processes-tf4557470.html#a13010714 Sent from the Cygwin Users mailing list archive at Nabble.com. -- 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/