Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.


source files: xetc.[ch], slisp/c/netseval.c




Prints a synopsis of the malloc()ed heap contents on stderr. MALLOC_PROFILING must have been defined in xlisp.h when the server was compiled.

If CRT_DEBUG_ALSO is #defined TRUE in crt_malloc.h then limited sanity checking will also be done on the heap after each malloc() package function invocation: See crt_malloc.c for additional settings controlling the thoroughness (hence slowness) of this checking.

Finally, there are TRULY_HEROIC_MALLOC_DEBUGGING #ifdefs in xlevel.c which may be flipped to compile in checking of the heap datastructures before and after each xlisp expression evaluation.

If you are writing a C primitive which you suspect of corrupting memory, while debugging you may wish to insert in it calls to CrT_check_everything(__FILE__,__LINE__); -- these calls will perform a reasonably thorough check of the malloc heap. If you do this, be sure you have compiled the server with MALLOC_PROFILING defined in xlisp.h and CRT_DEBUG_ALSO is #defined TRUE in crt_malloc.h.

When debugging heap problems on Linux, you may wish to setenv MALLOC_CHECK_ 2 and in extreme cases perhaps recompile libc's malloc with -DMALLOC_DEBUG.

Go to the first, previous, next, last section, table of contents.