home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 160.lha / Fragit / Docs < prev    next >
Text File  |  1988-04-27  |  3KB  |  79 lines

  1.   Fragit is a simple dynamic memory fragmenter/thrasher, possibly useful
  2. for debugging or testing purposes.  Please read the accompanying POSTER
  3. file for further background and implementation detail.
  4.  
  5.   Fragit was never designed to be run from the Workbench, but it probably
  6. could be if you bother to attach an icon to it.  From the CLI, just typing
  7. "Fragit" with no arguments runs the program using the default paramenters.
  8. Type "Fragit ?" to get the command line syntax for the optional paramenters.
  9.  
  10.   The command line arguments are arranged like this:
  11.  
  12.     Fragit [-verbose] [MinMemThresh [MinFragSize [MaxFragSize]]]
  13.  
  14.   You don't type the brackets -- they merely indicate that the enclosed
  15. paramenter is optional.  Note the nesting of brackets for the last three
  16. arguments; if you want to change the MaxFragSize, you MUST also specify
  17. the MinMemThresh and MinFragSize.
  18.  
  19.   This is the meaning of the parameters:
  20.  
  21. -verbose:      Sends debug information to the CLI.  Really, all you have
  22.         to type is "-v", the rest of argument is ignored.
  23.  
  24. MinMemThresh:     A number between 0 and 16000000 that determines how much
  25.         free memory Fragit will leave.  If free memory drops below
  26.         this threshold, Fragit will attempt to deallocate memory
  27.         fragments until free memory is above this level again.
  28.  
  29. MinFragSize:    A number between 0 and 1600000 that determines the
  30.         smallest fragment size to be allocated, i.e., all
  31.         fragments allocated by Fragit are guaranteed to be at
  32.         least this many bytes.
  33.  
  34. MaxFragSize:    A number between MinFragSize and 16000000 that determines
  35.         the largest fragment size to be allocated, i.e.,
  36.         no fragment allocated by Fragit will be larger than
  37.         this many bytes.
  38.  
  39.  
  40.   Note that your Min and MaxFragSize will actually be 16 bytes larger than
  41. what you specified, since each fragment allocated by Fragit also has
  42. a 16 byte node associated with it.  Thus, if you want Fragit to
  43. only allocate 4096 byte fragments, you'd type something like this:
  44.  
  45.     Fragit -v 100000 4080 4080
  46.  
  47.   Since Fragit will automatically add 16 bytes to this, you will get 4096
  48. byte blocks every time.
  49.  
  50.   The "default" command line would look something like this:
  51.  
  52.     Fragit 100000 8 10000
  53.  
  54.   Thus, Fragit will allocate blocks no smaller than 24 bytes, and no larger
  55. than 10016 bytes, and will try to keep the total free memory in the 
  56. system at about 100000 bytes, +/- 10000 bytes.
  57.  
  58.   To exit Fragit, click on the CLOSEWINDOW gadget in the Fragit window,
  59. or, you can activate the Fragit window and press RETURN or ESCAPE.
  60.  
  61.   As mentioned in the accompanying POSTER letter, there may be a problem
  62. with fragmentation on the Amiga.  The parameters I use to reproduce this
  63. problem are:
  64.  
  65.     Fragit -v 1000000 8 50000
  66.  
  67.   Thus, Fragit never lets memory get much below 1-meg, and allocates fragments
  68. up to 50K in size.  Usually, a couple of moments after the MinMemThresh has
  69. been hit the computer will crash with a GURU 3 or 4 and some bizarre address.
  70. If you cannot reproduce this problem, or if you can find something in my
  71. code that is illegal or wrong, I want to hear about it!
  72.  
  73.     Justin V. McCormick
  74.  
  75.         bix:     jmmccormick
  76.         home:    303-290-8429
  77.     work:    303-825-4144
  78.  
  79.