RE: known memory leak in simple easy calls in version 17?
Date: Thu, 21 Aug 2008 07:50:02 -0600
From: curl-library-bounces_at_cool.haxx.se [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Wednesday, August 20, 2008 11:31 PM
Subject: Re: known memory leak in simple easy calls in version 17?
On Wed, Aug 20, 2008 at 10:03:43PM -0600, Max L. Eidswick wrote:
> I have a definite memory leak happening with a simple test (source below). I question whether this is a curl issue or not as I
> confident up until now that the version 17 code for these simple easy calls is stable. This is too simple a problem to exist in
> that mature code base (I think).
You're probably right, for the simple test case you present, but there have
been by my count five memory leaks fixed in curl since 7.17.1.
OK, I guess I should transition to 18 -- we are in a release, but if there is good reason to believe that there is a leak in 17 we
will decide today to do a work around (by using a time to kill the service periodically and then restart it) or implement version
> Please take a quick look at the test win32 proc to see if there is anything obvious. If I comment out the call to easy perform
> there is no memory increase in the test process. If the call to easy perform is there is seems to burn through about 512-1024
> per call.
> If I remove the write buffering, there is no change.
> If I comment out the call to easy perform there is not memory gain by the test process.
> Are there any known memory leak issues like this in the version 17 code?
> This test is performing a complete global init and cleanup every loop, so perhaps that is the problem, although this test was
> supposed to prove that our memory leak in this test app was not in the curl code.
Are you using OpenSSL? Which version? A Win32 leak was just fixed there
earlier today. Please try using the latest nightly build and see if
you can still reproduce the leak. How are you determing that there is
a leak, anyway?
No OpenSSL and we have stripped the test out to the simplest of tests (like the one I posted). We have put memory monitoring code
in the actual test procs and watched the memory increase, but you can just as easily use the Windows Task Manager and watch Peak
Memory Usage for any test process using the test I posted in a loop. It will increase about 50k bytes per 100 iterations.
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-08-21