X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <4F67A1F6.3070304@gmail.com> Date: Mon, 19 Mar 2012 22:15:34 +0100 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: ~100KB usleep() memory leak References: <20120319173637 DOT GA7360 AT calimero DOT vinschen DOT de> In-Reply-To: <20120319173637.GA7360@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 On 3/19/2012 6:36 PM, Corinna Vinschen wrote: > On Mar 20 00:15, Konstantin Ivlev wrote: >> Hi All, >> >> I have noticed ~100KB usleep() memory leak then compile mine >> application under Cygwin. On Mac OS X 10.7 Lion it works fine (no >> leak). >> I am using Cygwin 1.7.11 version. >> so, each call of usleep() I can see in Task Manager or Process >> Explorer about ~100KB of memory are leaked. it is not so problematic, >> but if I am using thread pool (e.g. 16 threads) it will leak about >> ~1MB per seconds, and several minutes of running application are >> enough to waste all available memory ~4GB. >> >> it is easy to reproduce. compile the following really simple source code : >> >> #include >> >> int main() >> { >> for (;;) >> { >> usleep(10); >> } >> } > > Thanks for the report and the testcase. I just applied a patch to fix > this memory leak. I'm about tu generate a developer snapshot for > testing. Please try the today's snapshot from http://cygwin.com/snapshots/ > as soon as it is available. > > > Thanks, > Corinna > the new 20120319 snapshot seems to have collateral effect on dash+rebaseall 825 [waitproc] dash 3540! proc_waiter: error on read of child wait pipe 0x0, Win32 error 6 Marco Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple