home *** CD-ROM | disk | FTP | other *** search
- Here are two small C libraries which can be very useful for debugging.
- The changes since the previous versions are relatively minor.
-
-
-
- StubsHack
- ---------
-
- This is a C library which uses an idea of Martin Ebourne's to enable you
- to very easily redirect all calls to the ANSI memory allocation
- functions (malloc, realloc, calloc, free) to your own function. This
- could be used to add heap-checking to the malloc functions.
-
- The important point is that this happens at *runtime*, so even if you
- link your program with a library which was compiled years ago, all
- malloc calls within the library will be redirected.
-
- See my 'HeapGraph' library for an example of how to use StubsHack.
-
-
- HeapGraph
- ---------
-
- This is a C library which uses my StubsHack library to provide a
- very simple way of making your program send information on every block
- of memory allocated/freed to a file in pipe:$.C_Debug. This is scanned
- by the included application !HeapDisp, which displays your program's
- heap graphically in real time. There are facilities for sending
- debugging information.
-
- An example application is included.
-
-
-
- All source is included.
-
-
-
-
- - Julian Smith
-
- ------------------------
- julians@cogsci.ed.ac.uk
- ------------------------
-