Browse code

tls: TLS_MALLOC_DBG can now be set on make cfg

Enabling tls extra malloc debugging info, does not require anymore
editing tls_init.c. It can be enabled at cfg time
(make cfg extra_defs=-DTLS_MALLOC_DBG) or at compile/re-compile
time ( make -C modules/tls clean;
make -C modules/tls extra_defs=-DTLS_MALLOC_DBG).
When TLS_MALLOC_DBG is enabled, an extra warning will be printed
at compile time. NO_TLS_MALLOC_DBG takes precedence over
TLS_MALLOC_DBG.

Andrei Pelinescu-Onciul authored on 26/02/2010 12:39:55
Showing 1 changed files
... ...
@@ -128,12 +128,16 @@ int tls_force_run = 0; /* ignore some start-up sanity checks, use it
128 128
 
129 129
 const SSL_METHOD* ssl_methods[TLS_USE_SSLv23 + 1];
130 130
 
131
+#ifdef NO_TLS_MALLOC_DBG
131 132
 #undef TLS_MALLOC_DBG /* extra malloc debug info from openssl */
133
+#endif /* NO_TLS_MALLOC_DBG */
134
+
132 135
 /*
133 136
  * Wrappers around SER shared memory functions
134 137
  * (which can be macros)
135 138
  */
136 139
 #ifdef TLS_MALLOC_DBG
140
+#warning "tls module compiled with malloc debugging info (extra overhead)"
137 141
 #include <execinfo.h>
138 142
 
139 143
 /*