pike.git / src / dmalloc.h

version» Context lines:

pike.git/src/dmalloc.h:1:   /* -  * $Id: dmalloc.h,v 1.23 2000/03/27 06:34:05 hubbe Exp $ +  * $Id: dmalloc.h,v 1.24 2000/04/08 02:01:08 hubbe Exp $    */      extern char *debug_xalloc(long);      #define DMALLOC_LOCATION() ("S" __FILE__ ":" DEFINETOSTR(__LINE__) )      #ifdef DEBUG_MALLOC   struct memhdr;      void dump_memhdr_locations(struct memhdr *from,
pike.git/src/dmalloc.h:28: Inside #if defined(DEBUG_MALLOC)
  extern void dmalloc_free(void *p);   extern int debug_malloc_touch_fd(int, char *);   extern int debug_malloc_register_fd(int, char *);   extern int debug_malloc_close_fd(int, char *);      void *debug_malloc_update_location(void *, char *);   void search_all_memheaders_for_references(void);      /* Beware! names of named memory regions are never ever freed!! /Hubbe */   void *debug_malloc_name(void *p, char *fn, int line); - void debug_malloc_copy_names(void *p, void *p2); + int debug_malloc_copy_names(void *p, void *p2); + 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_LOCATION())   #define calloc(x, y) debug_calloc((x), (y), DMALLOC_LOCATION())   #define realloc(x, y) debug_realloc((x), (y), DMALLOC_LOCATION())   #define free(x) debug_free((x), DMALLOC_LOCATION(),0)
pike.git/src/dmalloc.h:56:   #define dmalloc_touch(TYPE,X) ((TYPE)debug_malloc_update_location((X),DMALLOC_LOCATION()))   #define dmalloc_touch_svalue(X) do { struct svalue *_tmp = (X); if ((X)->type <= MAX_REF_TYPE) { debug_malloc_touch(_tmp->u.refs); } } while(0)      #define DMALLOC_LINE_ARGS ,char * dmalloc_location   #define DMALLOC_POS ,DMALLOC_LOCATION()   #define DMALLOC_PROXY_ARGS ,dmalloc_location   void dmalloc_accept_leak(void *);   #define dmalloc_touch_fd(X) debug_malloc_touch_fd((X),DMALLOC_LOCATION())   #define dmalloc_register_fd(X) debug_malloc_register_fd((X),DMALLOC_LOCATION())   #define dmalloc_close_fd(X) debug_malloc_close_fd((X),DMALLOC_LOCATION()) +  + /* Beware, these do not exist without DMALLOC */ + struct memory_map; + void dmalloc_set_mmap(void *ptr, struct memory_map *m); + void dmalloc_set_mmap_template(void *ptr, struct memory_map *m); + void dmalloc_set_mmap_from_template(void *p, void *p2); + void dmalloc_describe_location(void *p, int offset); + struct memory_map *dmalloc_alloc_mmap(char *name, int line); + void dmalloc_add_mmap_entry(struct memory_map *m, +  char *name, +  int offset, +  int size, +  int count, +  struct memory_map *recur, +  int recur_offset); +  +    #else   #define dmalloc_touch_fd(X) (X)   #define dmalloc_register_fd(X) (X)   #define dmalloc_close_fd(X) (X)   #define dmfree(X) free((X))   #define dmalloc_accept_leak(X) (void)(X)   #define DMALLOC_LINE_ARGS   #define DMALLOC_POS   #define DMALLOC_PROXY_ARGS   #define debug_malloc_dump_references(X)
pike.git/src/dmalloc.h:78:   #define DO_IF_DMALLOC(X)   #define debug_malloc_update_location(X,Y) (X)   #define debug_malloc_touch(X)   #define debug_malloc_pass(X) (X)   #define dmalloc_touch(TYPE,X) (X)   #define dmalloc_touch_svalue(X)   #define dmalloc_register(X,Y,Z)   #define dmalloc_unregister(X,Y)   #define debug_free(X,Y,Z) free((X))   #define debug_malloc_name(P,FN,LINE) - #define debug_malloc_copy_names(p,p2) + #define debug_malloc_copy_names(p,p2) 0   #define search_all_memheaders_for_references() -  + #define dmalloc_find_name(X) "unknown (no dmalloc)"   #endif