cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory leak if FTP server responds "530 Login incorrect"

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Dec 2006 23:03:34 +0100 (CET)

On Mon, 11 Dec 2006, Alexey Simak wrote:

> Actually to find memory leaks I'm using some memory profiler tool on Win,
> not your memdebug module. So unfortunately I cannot say why leaks are not
> detected in your environment.

I'm not having the leak you pointed out so of course I'm not seeing it.

See my attached log of all memory (and other resource) allocations done during
the execution of your test app. As you will see, the memory you earlier
mentioned leaked (allocated at ftp.c:2557) is freed properly later on (at
ftp.c:3570 to be specific).

Are you saying you are using the latest CVS version when you run these tests?

> To prove that there are memory leaks I modified a test program to run a lot
> of FTP fetches sequentially. Then I ran it with performance monitor.
> Attached you can see a chart <memoryleak.pdf> which shows memory usage of
> test program during execution of 10 000 000 FTP fetches.

Unfortunately, I'm not seeing any leak here when I try 100 iterations.

memanalyze -v says:

Mallocs: 12800
Reallocs: 0
Callocs: 1100
Strdups: 400
Frees: 14300
Allocations: 14300
Maximum allocated: 55056

Where exactly does your tool say the leak is again? Still the same lines you
mentioned before?

I figure the only explanation then is that I'm doing this on Linux and you're
on Windows...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Received on 2006-12-11