home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / CBMDevKit5.dms / CBMDevKit5.adf / DOCS / tooldocs.lha / memoration.doc < prev    next >
Encoding:
Text File  |  1993-11-04  |  3.6 KB  |  89 lines

  1.  
  2.                            Memoration V1.0
  3.                            William S. Hawes
  4.  
  5. Memoration is a tool to selectively limit the ability of a task or module
  6. to allocate memory, thereby simulating the effects of a low-memory
  7. condition without the bother of actually running out of memory.  It works
  8. by SetFunctioning the Exec AllocMem and/or AllocVec entries and then
  9. screening the requests. If a request from a particular task or range of
  10. addresses is received, memoration returns a zero instead of passing it
  11. through to AllocMem.
  12.  
  13. When a task or module is denied a memory request, memoration sends a
  14. message to the serial port identifying the client task ID, the address it
  15. was called from, and the size of the denied request.  If the software can't
  16. handle being denied its memory request, this message will typically be
  17. followed by a series of enforcer reports telling of how the software went
  18. ahead and wrote to location 0.
  19.  
  20.  
  21. Command-Line Parameters.
  22. Memoration accepts command-line parameters to specify the module or task
  23. name and the range of memory sizes to disallow.  The argument template is
  24.  
  25. MODULE,TASK/K,CLI/K/N,OFF/S,MIN/K/N,MAX/K/N,AFTER/K/N,EVERY/K/N,ALLADDR/S,
  26. ALLOCVEC/S,CHIP/S,FAST/S,BACKTRACE/K/N
  27.  
  28. and the specifications can be changed at any time by reissuing the command.
  29.  
  30.  
  31. MODULE is the name of a ROMTag or library.  The resident modules are
  32. searched first, followed by a search of the system library list.  When an
  33. entry is found, the range of addresses encompassing its code is determined
  34. using several methods.  For ROMTags the range extends from the ROMTag
  35. itself to the next higher module, or to RT_ENDSKIP if no higher module
  36. exists.  For libraries a certain amount of voodoo is required, as the
  37. location of the library ROMtag isn't stored in the (public) library
  38. structure. In this case memoration examines the LVOs to determine the
  39. lowest and highest addresses, and then searches for a ROMtag in the range
  40. (low-$2000,high+$2000).  If a ROMTag is found, memoration uses the smaller
  41. of the ROMTag addresss and the lowest LVO address as the low limit, and the
  42. larger of the RT_ENDSKIP address and the highest LVO address as the high
  43. limit.
  44.  
  45. TASK specifies the name of a task to trap.  The task must exist at the time
  46. memoration is run, and for best results should persist for the course of
  47. testing.  If you're using WShell (as you should be) you can define a name
  48. for a particular shell instance by using ``newwsh name sucker''.
  49.  
  50. CLI specifies a shell number as the task to trap.
  51.  
  52. MIN specifies the minimum memory request to trap.  The default is 0.
  53.  
  54. MAX specifies the maximum allocation to trap.  The default is 2000000.
  55.  
  56. OFF turns off memory trapping.  The code patch is left intact, but won't
  57. trap any requests until enabled again.  AllocMem and AllocVec traps
  58. can be turned on and off separately.
  59.  
  60. ALLOCVEC sets the trap for the AllocVec() entry, instead of AllocMem().
  61. Both functions can be trapped independently.
  62.  
  63. AFTER specifies the number of allocations (within other specifications) to
  64. pass before beginning the trap.
  65.  
  66. EVERY traps every Nth allocation meeting the specifications.
  67.  
  68. ALLADDR sets the address range to all memory.
  69.  
  70. CHIP limits the trap to CHIP memory specifications.
  71.  
  72. FAST limits the trap to FAST memory specifications.
  73.  
  74. BACKTRACE specifies the number of longwords of stack backtrace desired.
  75.  
  76.  
  77. Examples:
  78.   memoration dos.library  ; disable all DOS allocations
  79.   memoration task DF0 min 400 ; disable larger allocations by DF0:
  80.   memoration icon.library task Workbench every 3
  81.   memoration console.device min 40 backtrace 8
  82.  
  83.  
  84. Further Notes.
  85. Memoration uses a seglist-split for its code patch, and so shouldn't be made
  86. resident, at least not on the first execution.
  87.  
  88.  
  89.