cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Possible memory leak with FTP and curl_easy_perform() ?

From: Wei Weng <wweng_at_acedsl.com>
Date: Wed, 15 Oct 2008 12:34:57 -0400

Jean-François Lavoie wrote:
> Hello Daniel,
>
> thanks for writing back. Since I am using Visual Studio, I could
> not find any package for version 7.19 and that is why I am still using
> 7.18.
>
> Here is the code with which I can reproduce the leak. As you will
> see, it is the ftpget.c example included in the curl package, which I
> modified to get a smaller file so that it iterates more often. I also
> added a while loop around the curl_easy_perforrm() call. When you run
> this program, after a few iterations (maybe 20), you will notice that
> the process will take 8 KB more memory, and after a few other
> iterations, 8 KB more again, and so on.. Is that behavior normal and
> everything will be cleaned after the 1000th iteration on the
> curl_easy_cleanup() call ?
>
> My application constantly gets small files from a ftp server and
> that is the reason I noticed that memory usage was slowly going up.
>
> Here is my platform information again :
>
> platform : MS windows XP SP2
> libcurl version : 7.18.00 win32 no SSL vc6 (downloaded from
> http://curl.haxx.se/download/libcurl-7.18.0-win32-msvc.zip )
> compiler : MS visual studio 2005
>
> Thank you for any help !
>
> Jeff
>

Jeff,

If you want to just use the non-secure protocols of curl, it is fairly simple
to build the curl yourself (IIRC, the last time I built curl with VS was years
 ago :)

Thanks
Wei
Received on 2008-10-15