From 48afadfe7c617991cefc289e0200bfbbadecdbb9 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 12 Jul 2017 20:32:20 +0300 Subject: Memory pool debug enabled with NXT_DEBUG_ALLOC define. --- src/nxt_log.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/nxt_log.h') diff --git a/src/nxt_log.h b/src/nxt_log.h index 504d2ee8..e32feb14 100644 --- a/src/nxt_log.h +++ b/src/nxt_log.h @@ -122,13 +122,9 @@ nxt_log_debug(_log, ...) \ } while (0) -#define nxt_debug_alloc(_fmt, ARGS...) \ - nxt_thread_log_debug("%08p: " _fmt, mp, ##ARGS) - #else #define nxt_debug(...) -#define nxt_debug_alloc(...) #define \ nxt_log_debug(...) @@ -136,6 +132,18 @@ nxt_log_debug(...) #endif +#if (NXT_DEBUG_ALLOC) + +#define nxt_debug_alloc(...) \ + nxt_thread_log_debug(__VA_ARGS__) + +#else + +#define nxt_debug_alloc(...) + +#endif + + #define \ nxt_main_log_emerg(...) \ nxt_log_emerg(&nxt_main_log, __VA_ARGS__) -- cgit