home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / code / stubshack / !Help
Encoding:
Text File  |  1995-01-12  |  1.2 KB  |  45 lines

  1. Here are two small C libraries which can be very useful for debugging.
  2. The changes since the previous versions are relatively minor.
  3.  
  4.  
  5.  
  6. StubsHack
  7. ---------
  8.  
  9. This is a C library which uses an idea of Martin Ebourne's to enable you
  10. to very easily redirect all calls to the ANSI memory allocation
  11. functions (malloc, realloc, calloc, free) to your own function. This
  12. could be used to add heap-checking to the malloc functions.
  13.  
  14. The important point is that this happens at *runtime*, so even if you
  15. link your program with a library which was compiled years ago, all
  16. malloc calls within the library will be redirected.
  17.  
  18. See my 'HeapGraph' library for an example of how to use StubsHack.
  19.  
  20.  
  21. HeapGraph
  22. ---------
  23.  
  24. This is a C library which uses my StubsHack library to provide a
  25. very simple way of making your program send information on every block
  26. of memory allocated/freed to a file in pipe:$.C_Debug. This is scanned
  27. by the included application !HeapDisp, which displays your program's
  28. heap graphically in real time. There are facilities for sending
  29. debugging information.
  30.  
  31. An example application is included.
  32.  
  33.  
  34.  
  35. All source is included.
  36.  
  37.  
  38.  
  39.  
  40. - Julian Smith
  41.  
  42. ------------------------
  43. julians@cogsci.ed.ac.uk
  44. ------------------------
  45.