curl/lib
2004-03-10 09:36:43 +00:00
..
.cvsignore
amigaos.c
amigaos.h
arpa_telnet.h
base64.c
base64.h
ca-bundle.crt
config-amigaos.h
config-mac.h
config-riscos.h
config-vms.h
config-win32.h
config.dj
connect.c
connect.h
content_encoding.c
content_encoding.h
cookie.c use calloc instead of malloc and we won't have to memset() the struct 2004-02-26 14:52:16 +00:00
cookie.h updated year in the copyright string 2004-01-07 09:19:33 +00:00
curllib.dsp
curllib.dsw
dict.c
dict.h
easy.c
escape.c size_t/int/long fixes 2004-03-08 08:38:29 +00:00
escape.h
file.c
file.h
formdata.c some more size_t usage, and two added typecasts when converting from size_t 2004-03-03 13:11:28 +00:00
formdata.h
ftp.c
ftp.h
getdate.c.cvs Rename getdate.c to getdate.c.cvs, since the "normal" build procedure do 2003-03-19 09:09:40 +00:00
getdate.h
getdate.y
getenv.c
getinfo.c
getinfo.h
hash.c
hash.h
hostip.c
hostip.h
http_chunks.c use size_t for the data, but keep the protos use ssize_t to better fit 2004-03-04 15:25:06 +00:00
http_chunks.h use size_t for the data, but keep the protos use ssize_t to better fit 2004-03-04 15:25:06 +00:00
http_digest.c
http_digest.h
http_negotiate.c
http_negotiate.h
http_ntlm.c
http_ntlm.h
http.c
http.h
if2ip.c
if2ip.h
inet_ntoa_r.h
inet_pton.c
inet_pton.h
krb4.c
krb4.h
ldap.c removed the ldaptext variable, it was only set and never used 2004-02-12 09:51:43 +00:00
ldap.h
libcurl.def
libcurl.framework.make
libcurl.plist
libcurl.rc the resource file itself 2003-11-07 07:20:15 +00:00
llist.c
llist.h
Makefile.am David J Meyer's large file support. 2004-01-05 22:29:29 +00:00
makefile.amiga Diego Casorran's amiga makefiles 2003-12-10 13:54:57 +00:00
Makefile.b32
Makefile.b32.resp
makefile.dj
Makefile.m32
Makefile.riscos
Makefile.vc6
md5.c Convert functions to ANSI-style declaration to prevent compiler warnings 2004-02-20 16:18:26 +00:00
md5.h
memdebug.c
memdebug.h
mprintf.c don't use 'register' 2004-03-08 11:28:14 +00:00
multi.c
netrc.c
netrc.h
progress.c Yet another curl_off_t printf format attempt, we now exclude the %-letter from 2004-03-02 09:31:18 +00:00
progress.h
README.ares
README.encoding
README.memoryleak
security.c use the HAVE_KRB4 define instead of just KRB4 2003-12-02 13:27:29 +00:00
security.h
sendf.c
sendf.h Use curl_socket_t instead of int for holding sockets. The typedefs and 2004-03-09 22:52:50 +00:00
setup.h Now requires an OS string defined by the config*.h file 2004-03-10 08:15:50 +00:00
share.c
share.h
speedcheck.c updated year in the copyright string 2004-01-07 09:19:33 +00:00
speedcheck.h
ssluse.c
ssluse.h
strequal.c
strequal.h
strtok.c
strtok.h
strtoofft.c
strtoofft.h
telnet.c
telnet.h
timeval.c make our private version of gettimeofday() static 2004-01-04 12:10:14 +00:00
timeval.h
transfer.c
transfer.h
url.c
url.h
urldata.h
version.c

$Id$
                                  _   _ ____  _     
                              ___| | | |  _ \| |    
                             / __| | | | |_) | |    
                            | (__| |_| |  _ <| |___ 
                             \___|\___/|_| \_\_____|

             How To Track Down Suspected Memory Leaks in libcurl
             ===================================================

Single-threaded

  Please note that this memory leak system is not adjusted to work in more
  than one thread. If you want/need to use it in a multi-threaded app. Please
  adjust accordingly.


Build

  Rebuild libcurl with -DCURLDEBUG (usually, rerunning configure with
  --enable-debug fixes this). 'make clean' first, then 'make' so that all
  files actually are rebuilt properly. It will also make sense to build
  libcurl with the debug option (usually -g to the compiler) so that debugging
  it will be easier if you actually do find a leak in the library.

  This will create a library that has memory debugging enabled.

Modify Your Application

  Add a line in your application code:

       curl_memdebug("filename");

  This will make the malloc debug system output a full trace of all resource
  using functions to the given file name. Make sure you rebuild your program
  and that you link with the same libcurl you built for this purpose as
  described above.

Run Your Application

  Run your program as usual. Watch the specified memory trace file grow.

  Make your program exit and use the proper libcurl cleanup functions etc. So
  that all non-leaks are returned/freed properly.

Analyze the Flow

  Use the tests/memanalyze.pl perl script to analyze the memdump file:

    tests/memanalyze.pl < memdump

  This now outputs a report on what resources that were allocated but never
  freed etc. This report is very fine for posting to the list!

  If this doesn't produce any output, no leak was detected in libcurl. Then
  the leak is mostly likely to be in your code.