Branch: Tag:

2001-01-30

2001-01-30 23:37:17 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more debug options..

Rev: src/acconfig.h:1.75
Rev: src/dmalloc.h:1.29
Rev: src/pike_memory.c:1.99

1:   /* -  * $Id: dmalloc.h,v 1.28 2000/12/13 21:24:44 hubbe Exp $ +  * $Id: dmalloc.h,v 1.29 2001/01/30 23:37:17 hubbe Exp $    */      PMOD_EXPORT extern char *debug_xalloc(size_t);
10:      #define DMALLOC_LOCATION() ("S" __FILE__ ":" DEFINETOSTR(__LINE__) )    + #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 +    #ifdef DEBUG_MALLOC   struct memhdr;   
112:   #endif   #define dbm_main main   #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))
124:   #define debug_malloc_copy_names(p,p2) 0   #define search_all_memheaders_for_references()   #define dmalloc_find_name(X) "unknown (no dmalloc)" +  + #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 + #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