X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fxmalloc.c;h=60dbc2c4b44ee7b67e967e1f1009cdebe25630c2;hb=48bd65a2f5bda9d3407d92137524c14d288ec074;hp=1b33b63c5cc15536292b3307242d5268b4a5143b;hpb=67e7a7a13ff1e787b9e5cfe84494dfd446c1bcb9;p=yaz-moved-to-github.git diff --git a/util/xmalloc.c b/util/xmalloc.c index 1b33b63..60dbc2c 100644 --- a/util/xmalloc.c +++ b/util/xmalloc.c @@ -3,7 +3,7 @@ * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * - * $Id: xmalloc.c,v 1.14 2001-11-06 17:05:19 adam Exp $ + * $Id: xmalloc.c,v 1.16 2002-04-16 13:04:20 heikki Exp $ */ #if HAVE_CONFIG_H @@ -17,7 +17,9 @@ #include #include -#define TRACE_XMALLOC 2 +#ifndef TRACE_XMALLOC +#define TRACE_XMALLOC 1 +#endif #if TRACE_XMALLOC > 1 @@ -212,7 +214,7 @@ void *xrealloc_f (void *o, size_t size, const char *file, int line) void *p = xrealloc_d (o, size, file, line); #if TRACE_XMALLOC - yaz_log (LOG_DEBUG, + yaz_log (LOG_MALLOC, "%s:%d: xrealloc(s=%d) %p -> %p", file, line, size, o, p); #endif if (!p) @@ -229,7 +231,7 @@ void *xmalloc_f (size_t size, const char *file, int line) void *p = xmalloc_d (size, file, line); #if TRACE_XMALLOC - yaz_log (LOG_DEBUG, "%s:%d: xmalloc(s=%d) %p", file, line, size, p); + yaz_log (LOG_MALLOC, "%s:%d: xmalloc(s=%d) %p", file, line, size, p); #endif if (!p) { @@ -243,7 +245,7 @@ void *xcalloc_f (size_t nmemb, size_t size, const char *file, int line) { void *p = xcalloc_d (nmemb, size, file, line); #if TRACE_XMALLOC - yaz_log (LOG_DEBUG, "%s:%d: xcalloc(s=%d) %p", file, line, size, p); + yaz_log (LOG_MALLOC, "%s:%d: xcalloc(s=%d) %p", file, line, size, p); #endif if (!p) { @@ -257,7 +259,7 @@ char *xstrdup_f (const char *s, const char *file, int line) { char *p = (char *)xmalloc_d (strlen(s)+1, file, line); #if TRACE_XMALLOC - yaz_log (LOG_DEBUG, "%s:%d: xstrdup(s=%d) %p", file, line, strlen(s)+1, p); + yaz_log (LOG_MALLOC, "%s:%d: xstrdup(s=%d) %p", file, line, strlen(s)+1, p); #endif strcpy (p, s); return p; @@ -269,7 +271,7 @@ void xfree_f(void *p, const char *file, int line) return ; #if TRACE_XMALLOC if (p) - yaz_log (LOG_DEBUG, "%s:%d: xfree %p", file, line, p); + yaz_log (LOG_MALLOC, "%s:%d: xfree %p", file, line, p); #endif xfree_d(p, file, line); }