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.38 2002/10/11 01:39:30 nilsson Exp $ + || $Id: dmalloc.h,v 1.39 2002/10/27 15:48:18 nilsson Exp $   */      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);      #define DMALLOC_LOCATION() (("NS" __FILE__ ":" DEFINETOSTR(__LINE__) )+1)      #ifdef DMALLOC_TRACE   #define DMALLOC_TRACELOGSIZE 131072      extern char *dmalloc_tracelog[DMALLOC_TRACELOGSIZE];   extern size_t dmalloc_tracelogptr;      #define DMALLOC_TRACE_LOG(X) (dmalloc_tracelog[ dmalloc_tracelogptr = (dmalloc_tracelogptr +1 )%DMALLOC_TRACELOGSIZE ] = (X))    - #endif + #endif /* DMALLOC_TRACE */      #ifdef DEBUG_MALLOC   struct memhdr;      void dump_memhdr_locations(struct memhdr *from,    struct memhdr *notfrom,    int indent);   struct memhdr *alloc_memhdr(void);   void really_free_memhdr(struct memhdr *mh);   void add_marks_to_memhdr(struct memhdr *to,void *ptr);
pike.git/src/dmalloc.h:99:   void dmalloc_add_mmap_entry(struct memory_map *m,    char *name,    int offset,    int size,    int count,    struct memory_map *recur,    int recur_offset);   int dmalloc_is_invalid_memory_block(void *block);       - #else + #else /* DEBUG_MALLOC */ +    #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,x,y,z)   #define debug_malloc_dump_fd(fd)   #define xalloc debug_xalloc -  +    #if defined(DYNAMIC_MODULE) && defined(__NT__)   #define xmalloc debug_xmalloc   #define xcalloc debug_xcalloc   #define xrealloc debug_xrealloc   #define xfree debug_xfree - #else + #else /* defined(DYNAMIC_MODULE) && defined(__NT__) */   #define xmalloc malloc   #define xcalloc calloc   #define xrealloc realloc   #define xfree free - #endif + #endif /* !(defined(DYNAMIC_MODULE) && defined(__NT__)) */ +    #define dbm_main main   #define DO_IF_DMALLOC(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) 0   #define search_all_memheaders_for_references()   #define dmalloc_find_name(X) "unknown (no dmalloc)"   #define dmalloc_touch_struct_ptr(TYPE,X,MEMBER) (X)      #ifdef DMALLOC_TRACE   #define debug_malloc_update_location(X,Y) (DMALLOC_TRACE_LOG(DMALLOC_LOCATION()),(X))   #define dmalloc_touch_svalue(X) DMALLOC_TRACE_LOG(DMALLOC_LOCATION())   #define debug_malloc_touch(X) DMALLOC_TRACE_LOG(DMALLOC_LOCATION())   #define debug_malloc_pass(X) (DMALLOC_TRACE_LOG(DMALLOC_LOCATION()),(X))   #define dmalloc_touch(TYPE,X) (DMALLOC_TRACE_LOG(DMALLOC_LOCATION()),(X)) - #else + #else /* DMALLOC_TRACE */   #define debug_malloc_update_location(X,Y) (X)   #define dmalloc_touch_svalue(X)   #define debug_malloc_touch(X)   #define debug_malloc_pass(X) (X)   #define dmalloc_touch(TYPE,X) (X) - #endif + #endif /* !MALLOC_TRACE */    - #endif + #endif /* !DEBUG_MALLOC */