home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / clib / progs / clibs / HeapGraph / !Help
Encoding:
Text File  |  1994-09-02  |  3.4 KB  |  115 lines

  1. HeapGraph version 1.00 01 Sep 1994
  2. ----------------------------------
  3.  
  4.  
  5.  
  6. Introduction
  7. ------------
  8.  
  9. This is a C library which uses my StubsHack library to provide a
  10. very simple way of making your program send information on every block
  11. of memory allocated/freed to a file in pipe:$.C_Debug. This is scanned
  12. by the included application !HeapDisp, which displays your program's
  13. heap graphically in real time, and also displays diagnostic text.
  14.  
  15.  
  16.  
  17. Installation 
  18. ------------
  19.  
  20. You should move the HeapGraph directory into your C path. Don't move any
  21. headers into an existing .h. directory, as they are refered to as
  22. 'HeapGraph.<headername>.h' in the source. 
  23.  
  24. I find this to be a much simpler way of organising C libraries than
  25. changing C$Path etc. It also protects against problems when header files
  26. from different libraries have the same name.
  27.  
  28. The actual library is 'HeapGraph.o.HGLib'.
  29.  
  30. Please note that HeapGraph needs my 'StubsHack' library to work.
  31.  
  32.  
  33.  
  34. To use in your own programs
  35. ---------------------------
  36.  
  37. HeapGraph is dead easy to use. Just include "HeapGraph.HeapGraph.h" in
  38. the source-file which contains your main() function and then, at the
  39. start of main, put a 'HeapGraph_RedirectAllocFns( NULL);'.
  40.  
  41. Link with HeapGraph.o.HGLib and StubsHack.o.SHLib (in that order, since
  42. HeapGraph refers to things in StubsHack).
  43.  
  44. Compile/link your program, run the program !Displayer, and start your
  45. program. Your program's heap will be dynamically displayed in one of
  46. !Displayer's windows.
  47.  
  48. If you do a '*Filer_OpenDir Pipe:$.C_Debug' from the command line, you
  49. will see the pipe file being created/emptied as the program runs.
  50.  
  51. An example program is provided which uses HeapGraph - it runs a program
  52. in a TaskWindow which continuously allocates/frees memory. !Displayer
  53. will show the blocks of memory moving around. HeapGraph also works
  54. perfectly with Wimp programs - in fact it should work with anything that
  55. can write to the pipe filing system.
  56.  
  57.  
  58.  
  59. !HeapDisp
  60. ---------
  61.  
  62. This uses my Shell library and DeskLib, and is not particulaly polished.
  63. If you would like to improve it, it's made available under the GNU
  64. licence, so you must release the source with any released improved
  65. version.
  66.  
  67. !HeapDisp will continuously scan Pipe:$.C_Debug.*. When it finds a file,
  68. it will open a separate window for it - !HeapDisp can display the heap
  69. of any number of programs at the same time. 
  70.  
  71. You can also send text to !HeapDisp which it will display along with the
  72. heap display - just use HeapGraph_Sendf( ...) in exactly the same way
  73. that you would use printf( ...).
  74.  
  75. Pressing <Shift>-Menu will bring up a save box. If the click was over
  76. text, this text will be saved. If the click was over the picture of the
  77. heap, it will be saved as a sprite. This isn't particulaly useful, but
  78. Shell has the code in it aready, so there's no harm done or programming
  79. time wasted!
  80.  
  81. Pressing Menu will bring up a menu with which you can set the vertical
  82. size of the heap display.
  83.  
  84.  
  85.  
  86. Other
  87. -----
  88.  
  89. All the contents of the HeapGraph directory are © Julian Smith, 1994.
  90. Feel free to distribute it, but only distribute the original version. If
  91. you make any changes, please send them to me and I'll send them out with
  92. the next release.
  93.  
  94. Any suggestions/comments/bug fixes etc are very much welcomed.
  95.  
  96.  
  97.  
  98. - Julian Smith
  99.  
  100.  
  101. ------------------------
  102. julians@cogsci.ed.ac.uk
  103. ------------------------
  104.  
  105. or:
  106.  
  107. ------------------------
  108. Department of Psychology
  109. University of Edinburgh
  110. 7 George Square
  111. Edinburgh
  112. EH8 9JZ
  113. UK
  114. ------------------------
  115.