Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Authentication-Warning: atacama.four-d.de: mail set sender to using -f Message-ID: <3FAF8462.3030301@gmx.net> Date: Mon, 10 Nov 2003 13:28:18 +0100 From: Thomas Pfaff User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arash Partow CC: cygwin AT cygwin DOT com Subject: Re: New Pthread and Cygwin layer issues... References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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/