pike.git / src / dmalloc.h

version» Context lines:

pike.git/src/dmalloc.h:35:      #define DMALLOC_LOCATION() DMALLOC_NAMED_LOCATION("")      /* Location types in loc[0]:    * 'S': static (DMALLOC_NAMED_LOCATION)    * 'D': dynamic (dynamic_location)    * 'B': dynamic with backtrace (debug_malloc_update_location_bt)    * 'T': memory map template    * 'M': memory map    */ - typedef char *LOCATION; + typedef const char *LOCATION;   #define LOCATION_TYPE(X) ((X)[0])   #define LOCATION_NAME(X) ((X)+1)   #define LOCATION_IS_DYNAMIC(X) \    (LOCATION_TYPE (X)=='D' || LOCATION_TYPE (X) == 'B')      #ifdef DMALLOC_TRACE   #define DMALLOC_TRACELOGSIZE 131072      extern char *dmalloc_tracelog[DMALLOC_TRACELOGSIZE];   extern size_t dmalloc_tracelogptr;
pike.git/src/dmalloc.h:103: Inside #if defined(DEBUG_MALLOC)
     PMOD_EXPORT void *debug_malloc_update_location(void *, LOCATION);   PMOD_EXPORT void *debug_malloc_update_location_ptr(void *, ptrdiff_t, LOCATION);   PMOD_EXPORT void *debug_malloc_update_location_bt (void *p, const char *file,    INT_TYPE line, const char *name);   void search_all_memheaders_for_references(void);      /* Beware! names of named memory regions are never ever freed!! /Hubbe */   PMOD_EXPORT void *debug_malloc_name(void *p, const char *fn, INT_TYPE line);   PMOD_EXPORT int debug_malloc_copy_names(void *p, void *p2); - char *dmalloc_find_name(void *p); + const char *dmalloc_find_name(void *p);      /* glibc 2.1 defines this as a macro. */   #ifdef strdup   #undef strdup   #endif      #define malloc(x) debug_malloc((x), DMALLOC_NAMED_LOCATION(" malloc"))   #define calloc(x, y) debug_calloc((x), (y), DMALLOC_NAMED_LOCATION(" calloc"))   #define realloc(x, y) debug_realloc((x), (y), DMALLOC_NAMED_LOCATION(" realloc"))   #define free(x) debug_free((x), DMALLOC_NAMED_LOCATION(" free"),0)