aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-21 18:01:11 +0000
committerYang Tse <yangsita@gmail.com>2009-10-21 18:01:11 +0000
commit3f8d3e9c50af5b23aa50f2f0336da57023402a78 (patch)
tree6c9c07cc27be6141691593d38a79ee48b9fb69d0
parent1951cd1eeee15192b5587864ad2d75f215e6a122 (diff)
Update memory tracking/debugging reference
-rw-r--r--docs/INTERNALS17
-rw-r--r--lib/config.dos3
2 files changed, 16 insertions, 4 deletions
diff --git a/docs/INTERNALS b/docs/INTERNALS
index e1b5da5fb..ced5df51f 100644
--- a/docs/INTERNALS
+++ b/docs/INTERNALS
@@ -437,12 +437,23 @@ Memory Debugging
after a complete session,
memanalyze.pl is the perl script present only present in CVS (not part of the
- release archives) that analyzes a log file generated by the memdebug
+ release archives) that analyzes a log file generated by the memory tracking
system. It detects if resources are allocated but never freed and other kinds
of errors related to resource management.
- Use -DMALLOCDEBUG when compiling to enable memory debugging, this is also
- switched on by running configure with --enable-debug.
+ Internally, definition of preprocessor symbol DEBUGBUILD restricts code which
+ is only compiled for debug enabled builds. And symbol CURLDEBUG is used to
+ differentiate code which is _only_ used for memory tracking/debugging.
+
+ Use -DCURLDEBUG when compiling to enable memory debugging, this is also
+ switched on by running configure with --enable-curldebug. Use -DDEBUGBUILD
+ when compiling to enable a debug build or run configure with --enable-debug.
+
+ curl --version will list 'Debug' feature for debug enabled builds, and
+ will list 'TrackMemory' feature for curl debug memory tracking capable
+ builds. These features are independent and can be controlled when running
+ the configure script. When --enable-debug is given both features will be
+ enabled, unless some restriction prevents memory tracking from being used.
Test Suite
==========
diff --git a/lib/config.dos b/lib/config.dos
index df4809133..b59a85ca5 100644
--- a/lib/config.dos
+++ b/lib/config.dos
@@ -101,7 +101,8 @@
#define BSD
-/* #define MALLOCDEBUG */
+/* CURLDEBUG definition enables memory tracking */
+/* #define CURLDEBUG */
/* USE_ZLIB on cmd-line */
#ifdef USE_ZLIB