pike.git / src / dmalloc.h

version» Context lines:

pike.git/src/dmalloc.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dmalloc.h,v 1.67 2008/09/03 19:47:20 grubba Exp $ + || $Id: dmalloc.h,v 1.68 2008/09/04 20:31:07 mast Exp $   */      #ifndef DMALLOC_H   #define DMALLOC_H      PMOD_EXPORT extern void *debug_xalloc(size_t);   PMOD_EXPORT extern void debug_xfree(void *);   PMOD_EXPORT extern void *debug_xmalloc(size_t);   PMOD_EXPORT extern void *debug_xcalloc(size_t,size_t);   PMOD_EXPORT extern void *debug_xrealloc(void *,size_t);   PMOD_EXPORT char *debug_xstrdup(const char *src);    - #if defined (HAVE_EXECINFO_H) && defined (HAVE_BACKTRACE) && defined(DMALLOC_C_STACK_TRACE) + #if defined (HAVE_EXECINFO_H) && defined (HAVE_BACKTRACE)   /* GNU libc provides some tools to inspect the stack. */   #include <execinfo.h>   typedef void *c_stack_frame; - #define C_STACK_TRACE +       #define DUMP_C_STACK_TRACE() do { \    c_stack_frame bt[100]; \    int n = backtrace (bt, 100); \    backtrace_symbols_fd (bt, n, 2); \    } while (0)      #else -  + #undef DMALLOC_C_STACK_TRACE   #define DUMP_C_STACK_TRACE() do {} while (0)   #endif      #define DMALLOC_NAMED_LOCATION(NAME) \    (("NS" __FILE__ ":" DEFINETOSTR(__LINE__) NAME )+1)      #define DMALLOC_LOCATION() DMALLOC_NAMED_LOCATION("")      /* Location types in loc[0]:    * 'S': static (DMALLOC_NAMED_LOCATION)