home *** CD-ROM | disk | FTP | other *** search
- Fragit is a simple dynamic memory fragmenter/thrasher, possibly useful
- for debugging or testing purposes. Please read the accompanying POSTER
- file for further background and implementation detail.
-
- Fragit was never designed to be run from the Workbench, but it probably
- could be if you bother to attach an icon to it. From the CLI, just typing
- "Fragit" with no arguments runs the program using the default paramenters.
- Type "Fragit ?" to get the command line syntax for the optional paramenters.
-
- The command line arguments are arranged like this:
-
- Fragit [-verbose] [MinMemThresh [MinFragSize [MaxFragSize]]]
-
- You don't type the brackets -- they merely indicate that the enclosed
- paramenter is optional. Note the nesting of brackets for the last three
- arguments; if you want to change the MaxFragSize, you MUST also specify
- the MinMemThresh and MinFragSize.
-
- This is the meaning of the parameters:
-
- -verbose: Sends debug information to the CLI. Really, all you have
- to type is "-v", the rest of argument is ignored.
-
- MinMemThresh: A number between 0 and 16000000 that determines how much
- free memory Fragit will leave. If free memory drops below
- this threshold, Fragit will attempt to deallocate memory
- fragments until free memory is above this level again.
-
- MinFragSize: A number between 0 and 1600000 that determines the
- smallest fragment size to be allocated, i.e., all
- fragments allocated by Fragit are guaranteed to be at
- least this many bytes.
-
- MaxFragSize: A number between MinFragSize and 16000000 that determines
- the largest fragment size to be allocated, i.e.,
- no fragment allocated by Fragit will be larger than
- this many bytes.
-
-
- Note that your Min and MaxFragSize will actually be 16 bytes larger than
- what you specified, since each fragment allocated by Fragit also has
- a 16 byte node associated with it. Thus, if you want Fragit to
- only allocate 4096 byte fragments, you'd type something like this:
-
- Fragit -v 100000 4080 4080
-
- Since Fragit will automatically add 16 bytes to this, you will get 4096
- byte blocks every time.
-
- The "default" command line would look something like this:
-
- Fragit 100000 8 10000
-
- Thus, Fragit will allocate blocks no smaller than 24 bytes, and no larger
- than 10016 bytes, and will try to keep the total free memory in the
- system at about 100000 bytes, +/- 10000 bytes.
-
- To exit Fragit, click on the CLOSEWINDOW gadget in the Fragit window,
- or, you can activate the Fragit window and press RETURN or ESCAPE.
-
- As mentioned in the accompanying POSTER letter, there may be a problem
- with fragmentation on the Amiga. The parameters I use to reproduce this
- problem are:
-
- Fragit -v 1000000 8 50000
-
- Thus, Fragit never lets memory get much below 1-meg, and allocates fragments
- up to 50K in size. Usually, a couple of moments after the MinMemThresh has
- been hit the computer will crash with a GURU 3 or 4 and some bizarre address.
- If you cannot reproduce this problem, or if you can find something in my
- code that is illegal or wrong, I want to hear about it!
-
- Justin V. McCormick
-
- bix: jmmccormick
- home: 303-290-8429
- work: 303-825-4144
-
-