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.50 2004/04/18 02:16:05 mast Exp $ + || $Id: dmalloc.h,v 1.51 2004/09/02 11:17:16 grubba 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);
pike.git/src/dmalloc.h:64: Inside #if defined(DEBUG_MALLOC)
  extern void *debug_malloc(size_t, LOCATION);   extern void *debug_calloc(size_t, size_t, LOCATION);   extern void *debug_realloc(void *, size_t, LOCATION);   extern void debug_free(void *, LOCATION, int);   extern char *debug_strdup(const char *, LOCATION);   extern void reset_debug_malloc(void);   void dmalloc_check_block_free(void *, LOCATION, char *, describe_block_fn *);   extern void dmalloc_free(void *p);   extern int debug_malloc_touch_fd(int, LOCATION);   extern int debug_malloc_register_fd(int, LOCATION); + extern void debug_malloc_accept_leak_fd(int);   extern int debug_malloc_close_fd(int, LOCATION);   extern int dmalloc_mark_as_free(void*,int);      void *debug_malloc_update_location(void *, LOCATION);   void *debug_malloc_update_location_ptr(void *, ptrdiff_t, LOCATION);   void search_all_memheaders_for_references(void);   void cleanup_memhdrs(void);   void cleanup_debug_malloc(void);      /* Beware! names of named memory regions are never ever freed!! /Hubbe */
pike.git/src/dmalloc.h:108:   #define dmalloc_touch(TYPE,X) ((TYPE)debug_malloc_update_location((void *)(X),DMALLOC_LOCATION()))   void debug_malloc_dump_fd(int fd);   #define dmalloc_touch_svalue(X) do { struct svalue *_tmp = (X); if (_tmp->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_accept_leak_fd(X) debug_malloc_accept_leak_fd(X)   #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, int indent);   struct memory_map *dmalloc_alloc_mmap(char *name, int line);   void dmalloc_add_mmap_entry(struct memory_map *m,
pike.git/src/dmalloc.h:131:    int count,    struct memory_map *recur,    int recur_offset);   int dmalloc_is_invalid_memory_block(void *block);         #else /* DEBUG_MALLOC */      #define dmalloc_touch_fd(X) (X)   #define dmalloc_register_fd(X) (X) + #define dmalloc_accept_leak_fd(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,x,y,z)   #define debug_malloc_dump_fd(fd)   #define xalloc debug_xalloc