home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d932 / stackmon.lha / StackMon / StackMon.doc < prev    next >
Text File  |  1993-12-20  |  3KB  |  84 lines

  1.  
  2.                    StackMon v1.0
  3.                    -------------
  4.  
  5.                 © 1993 David Kinder
  6.                 -------------------
  7.  
  8. Introduction
  9. ------------
  10.  
  11. StackMon is a small utility to help programmers (and other users). Amiga
  12. programs use their stack (a special area of memory) to store temporary
  13. addresses, data, etc. The default stack is 4096 bytes, but this may not
  14. be enough; some compilers can require over 100Kb. The stack size for a shell
  15. is set by the 'stack' command. For a program run from Workbench, the size
  16. is given in the icon; use the Workbench 'Information' option to examine
  17. this value.
  18.  
  19. Use
  20. ---
  21.  
  22. StackMon requires AmigaDOS 2.04 or higher. There are no startup options;
  23. just run StackMon from a shell or click on its icon.
  24.  
  25. When run StackMon presents a list of all the tasks and processes currently
  26. running. This list is not updated automatically, as constructing this list
  27. requires suspension of multitasking. If you run a program you want to
  28. monitor after starting StackMon, click on the 'Update list' gadget so that
  29. it appears in the list.
  30.  
  31. If the program you want to monitor was run from the Workbench, its name will
  32. be that of the icon; if run from the shell the name is the exact name typed
  33. into the shell, with path.
  34.  
  35. Click on the program you wish to monitor and StackMon will begin monitoring.
  36. The display consists of numbers and a fuel gauge showing the current stack
  37. use relative to the size of the stack. The numbers are:
  38.  
  39. Current: This is the amount of stack in use when the program was last
  40.      monitored.
  41. Largest: The largest recorded stack ever in use by this program.
  42. Stack  : The stack allocated for this program.
  43.  
  44. If the program terminates while being monitored, monitoring ceases, and the
  45. message 'Task Terminated' appears in the window. Monitoring of a program
  46. can also be stopped by clicking on the 'Cancel' gadget. To change from
  47. monitoring one program to another, simply click on the other program's name
  48. in the list.
  49.  
  50. If the program exceeds its allowed stack, the message 'Stack Overflow'
  51. will appear. Note that this behaviour by a program will make the system
  52. very unstable and a crash is probably imminent. When setting the stack for
  53. a program, always leave at least ~2Kb extra space, since DOS can also
  54. use this stack and future versions of DOS may use more stack.
  55.  
  56. Caveat
  57. ------
  58.  
  59. StackMon takes a 'snapshot' of the stack use of a program, so a very sudden
  60. 'burst' of stack use may be missed. This is not very likely, however, as
  61. StackMon checks the program several times a second.
  62.  
  63. Compiler
  64. --------
  65.  
  66. StackMon was written using Amiga E v2.1b, a freely distributable compiler.
  67. Note that E programs have their own stack managememt system, so StackMon is
  68. not useful with these programs. However, E programs do not appear to ever
  69. have stack overflow problems, as the compiler estimates the stack required
  70. at compile time.
  71.  
  72. Address
  73. -------
  74.  
  75. Bug reports, comments, etc. to:
  76.  
  77. InterNet Email (prefered): kinder@teaching.physics.ox.ac.uk
  78.  
  79. Post: David Kinder,
  80.       2, Clwtt Cottages,
  81.       Bangor Rd.,
  82.       Gyfelia,
  83.       Clwyd. LL13 0YL.
  84.