From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24150 invoked by alias); 19 Mar 2012 17:37:59 -0000 Received: (qmail 19394 invoked by uid 22791); 19 Mar 2012 17:37:11 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 19 Mar 2012 17:36:40 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 5CC4A2C006E; Mon, 19 Mar 2012 18:36:37 +0100 (CET) Date: Mon, 19 Mar 2012 17:37:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: ~100KB usleep() memory leak Message-ID: <20120319173637.GA7360@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-03/txt/msg00533.txt.bz2 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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