[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Add --with-dmalloc configure option



Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv32444/src/or

Modified Files:
	main.c 
Log Message:
Add --with-dmalloc configure option

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.438
retrieving revision 1.439
diff -u -d -r1.438 -r1.439
--- main.c	3 Feb 2005 07:23:48 -0000	1.438
+++ main.c	3 Feb 2005 07:25:10 -0000	1.439
@@ -11,6 +11,10 @@
  **/
 
 #include "or.h"
+#include "orconfig.h"
+#ifdef USE_DMALLOC
+#include <dmalloc.h>
+#endif
 
 /* These signals are defined to help control_signal_act work. */
 #ifndef SIGHUP
@@ -1314,7 +1318,11 @@
   crypto_global_cleanup();
   if (accounting_is_enabled(options))
     accounting_record_bandwidth_usage(time(NULL));
+#ifdef USE_DMALLOC
   tor_free_all();
+  dmalloc_log_unfreed();
+  dmalloc_shutdown();
+#endif
 }
 
 /** Read/create keys as needed, and echo our fingerprint to stdout. */