This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ~100KB usleep() memory leak

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 <unistd.h>
> 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
as soon as it is available.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]