home *** CD-ROM | disk | FTP | other *** search
- MODULE Clean;
-
- (*=========================================================================*)
- (* Clean - Written in M2Sprint FROM M2S Ltd. *)
- (*=========================================================================*)
- (* Copyright (c) 1989 Chris Everett, All Rights Reserved *)
- (* This is freely redistributable *)
- (*=========================================================================*)
- (* Version: 1.01 Author : Chris Everett *)
- (* Date : 21-Sep-89 Changes: Recompiled w/V1.12 M2Sprint *)
- (*=========================================================================*)
- (* *)
- (* De-fragments RAM by requesting a rediculous amount of memory. The *)
- (* system can't get that much (16MB), so it flushes all libraries and *)
- (* tries again. The process of flushing all open libraries usually will *)
- (* de-fragment RAM. *)
- (* *)
- (* This version does something a bit different from Sweep and all the *)
- (* others - it first closes the Workbench screen, then tries to allocate *)
- (* 16MB of both Fast and Chip RAM, then re-opens the Workbench screen. *)
- (* This seems to do a much better job of de-fragmenting Chip RAM. *)
- (* *)
- (* For example, use Avail to check on the status of Chip RAM, then run *)
- (* DeluxePaint III. Exit from DPaint, then run Avail again. There *)
- (* should be a much smaller contigous amount of Chip RAM available. *)
- (* Using Sweep doesn't affect this at all, but Clean completely restores *)
- (* Chip RAM to it's original state. *)
- (* *)
- (* E-Mail: Questions, comments, etc. may be E-Mailed to me on the *)
- (* LightSpeed BBS @ (503) 777-1252, or the NAG BBS @ *)
- (* (503) 656-7393. (Both are PC-Pursuitable.) *)
- (* *)
- (*=========================================================================*)
- (* Link with RTnoWB.lnk *)
- (*=========================================================================*)
-
- (*ALL_CHECKS-*)
-
- FROM SYSTEM IMPORT ADDRESS;
- FROM Memory IMPORT AllocMem, MemReqSet, MemChip, MemFast;
- FROM Intuition IMPORT CloseWorkBench, OpenWorkBench;
-
-
- VAR
-
- Adr : ADDRESS;
- temp : BOOLEAN;
-
- BEGIN
-
- temp := CloseWorkBench();
- Adr := AllocMem(1000000H,MemReqSet{MemFast});
- Adr := AllocMem(1000000H,MemReqSet{MemChip});
- temp := OpenWorkBench();
-
- END Clean.
-