delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/05/22:28:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <BAY107-F11AE32BA8FD845DE7FA034D6FB0@phx.gbl>
X-Originating-Email: [arashp AT hotmail DOT com]
X-Sender: arashp AT hotmail DOT com
In-Reply-To: <20050606013259.GA7319@trixie.casa.cgf.cx>
From: "Arash Partow" <arashp AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Problem with pthreads (serious memory leaks)
Date: Mon, 06 Jun 2005 02:28:45 +0000
Mime-Version: 1.0
X-IsSubscribed: yes

Hi Chris,

How many times can we do this dance ? he he he he :)

The code given is as simple as its gonna get. This is the same
code used by Thomas Pfaff and by YOU to fix previous memory
leaks found in cygwin :)

OK in simple terms this is what I see: I run example1 and
open up my taskmanager and taskinfo and slowly watch the
amount of memory example1 is using increase continuously.

I then focus on taskinfo (because it gives a more detailed
view), and examine the the different aspects of the application
running (the threads, the loaded modules etc...). Now I know
just as well as anyone else that because say a program crashes
in a standard lib routine, doesn't mean the routine is buggy.
Most likely data fed into it has been corrupted etc (especially
in a threaded environment)....

In any case I've provided my analysis lacking as it may be it
is nonetheless worthy a second review (at least) is it not? ;)



Kind regards




Arash Partow
__________________________________________________
Be one who knows what they don't know,
Instead of being one who knows not what they don't know,
Thinking they know everything about all things.
http://www.partow.net




>
>On Mon, Jun 06, 2005 at 12:37:14AM +0000, Arash Partow wrote:
> >I'm encountering some memory leaks when using pthreads under cygwin.
> >As usual the code has been compiled/run on other *nixes (openbsd3.7,
> >netbsd2.0 and mandrake10.1) and the leak does not seem to occur.
> >
> >The system specs are as follows:
> >
> >1.) gcc 3.3.3
> >2.) cygwin dll, snapshots as of:
> >   3/6, 1/6, 28/5, 24/5
> >   (all produce the same result - haven't test earlier version to
> >   see where the break comes from.)
> >3.) WinXP Pro SP2 and WinXP Pro 64 SP1
> >4.) Dual AMD 64 4k
> >5.) 4 gig RAM
> >
> >
> >Example code can be found here:
> >
> >url:
> >http://www.partow.net/downloads/producer-consumer-source.zip
> >
> >
> >To make and run do the following
> >
> >make all
> >
> >./example1
> >
> >using taskmanager or sysinternals or taskinfo one can see that
> >there is a huge amount of memory being leaked within cygwin1.dll
>
>How would you come to the conclusion that something is being "leaked"?
>
>
>You'll probably going to have to:
>
>1) Use precise language to describe your problem.
>
>2) Produce a simple(r) test case which demonstrates it.
>
>...if you truly want this fixed.  Perhaps I'm wrong, but I don't think
>that anyone is going to want to debug a large application to figure out
>what or if the problem is.
>
>cgf



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019