AminetAminet
Search:
84520 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/boot/FragCure.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Minimise mem fragmentation (=have more free mem)
Author:rade at coli.uni-sb.de (Ralph Debusmann)
Uploader:rade coli uni-sb de (Ralph Debusmann)
Type:util/boot
Architecture:m68k-amigaos
Date:1998-03-17
Download:http://aminet.net/util/boot/FragCure.lha - View contents
Readme:http://aminet.net/util/boot/FragCure.readme
Downloads:597

Hey Sailor.

You might know the tools "LowFrag" and "FragLess" from Aminet which
both help to prevent memory fragmentation. FragCure follows the same
idea. Which goes like this: Every call to "AllocMem" and "AllocVec"
(the latter in fact also calls "AllocMem") is intercepted and asked
the question of how much memory is to be allocated. If the number of
bytes to be allocated is smaller than, say, 32768 bytes, AmigaOS is
asked to look for free memory from the top address of the memory pool
downwards. Otherwise, free memory is looked for from the floor address
of the memory pool upwards. Thus you prevent memory fragmentation to
a certain degree by disassociating smaller from bigger memory chunks.
This quite ingenious idea sprang from the author of "LowFrag"'s mind,
so thank him.

Why should you use FragCure instead of any of the two? Two reasons:
1st "LowFrag" is written in E and is a little too big for memory hungry
people like myself, 2nd "FragLess" doesn't seem to be written too
nicely, since it crashes quite badly on my 060. FragCure is both small
(takes the whole lot of 24 bytes from precious your memory) and
reliable. And I use it ,)

FragCure is easy to use. Just place it anywhere in your startup-sequence
(best at the top of it). You might want to experiment with the "bytes
boundary" which is used to distinguish smaller from bigger chunks of
memory by the BYTES-argument. Thus:

FragCure BYTES=65536
or
FragCure 65536

will put the "bytes boundary" to 64K for instance. FragCure cannot be
cancelled unless you use Spock's seizure (=reset). I am jolly sorry
for my laziness here.

Oh, BTW, I currently use a boundary of 424242 bytes, which seems to work
quite well for me :)

The assembly source is provided within this very archive. Any suggestions
are welcome, just write a mail and that'll make me happy :)

Ciao, r at ((e


P.S.: The patch should run on any Amiga (68k-only of course :) with a
couple of bytes of free memory and Kickstart 3.0+, since the "MEMF_REVERSE"-
switch used for the patch doesn't yet work properly in v37 (that's what
the AutoDocs say).


Contents of util/boot/FragCure.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  588    1233  47.7% -lh5- e27c Mar 16  1998 FragCure.info
[generic]                  223     268  83.2% -lh5- e7c3 Mar 16  1998 FragCure/FragCure
[generic]                 1104    2077  53.2% -lh5- 922c Jan  9  1980 FragCure/FragCure.doc
[generic]                 1237    2809  44.0% -lh5- 042a Jan  9  1980 FragCure/FragCure.s
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         4 files    3152    6387  49.4%            Mar 17  1998

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>