This is the mail archive of the cygwin@cygwin.com 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: New Pthread and Cygwin layer issues...


Arash Partow wrote:
Hi All,

I'm writing about another issue I've found with cygwin layer, pthreads,
memory leaks. I've updated to the lastest g++, currently I'm using
the cygwin1.dll from 8th Nov.

Now the issue is that the ThreadTest (url to source available below) is now
leaking a "HUGE!" amount of memory, and all indications seem to be coming from
the cygwin1.dll.


Previous version of the ThreadTest did not include mutexes, so I recently
implemented a simple mutex class to see how it pans out on cygwin.

I think the leak was introduced after the new gcc was put out, because even
the previous version of the ThreadTest that did not test mutexes is leaking
memory now, I think the majority of mem-leak problems came about after the
cygwin1.dll snapshot of the 28th Oct. Previous to that the original Thread
Test was not leaking memory. However now using the new gcc 3.3.1-3 and dlls
of 2nd,3rd,4th,6th,7th and 8th the original ThreadTest leaks memory like
water through a sieve, whats gone wrong ? what has changed so dramatically
in the past 1.5 weeks?

Only your test case ;-) .


The memory leak was already in the cygwin dll and is stdio related. Memory is allocated during thread stdio but is not freed on thread termination. Since your older test cases didn't make debug printfs in in the execute method it hasn't bite you.

Thomas


-- 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/


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