Slimelite BBS

Vivid.lha

Back to debug

Trace the origin of memory flushes.

Size
12K (12,026 bytes)
Added
2026-11-20 02:43
Downloads
2
Long Description
Visit my homepage at: http://www2.prestel.co.uk/ab2000 ------------------------------ Introduction ------------------------------ Vivid is a simple tool (much like Enforcer) that allows the user to monitor the origin of memory flushes. This tool is really for the advanced Amiga user, but can be used by anyone who is curious about what task or process is flushing the memory. It does this by installing a dummy low memory handler onto the system. So every time a memory allocation fails (i.e. AllocMem() or AllocVec() returns a NULL), the system will attempt to flush as much memory as possible by traversing the list of installed low memory handlers, calling each of them. When the dummy handler installed by Vivid is called, it will collect as much information about the task that triggered the flush, then print this information to the Shell window. Typically, a program flushes the memory by calling AllocMem(~0,MEMF_ANY) or similar. The full C source code has been included for the curious. ------------------------------ DISCLAIMER ------------------------------ FOR THE PURPOSE OF THIS DISCLAIMER, "SOFTWARE" REFERS TO ALL THE FILES PROVIDED IN THE ORIGINAL ARCHIVE DISTRIBUTED BY THE AUTHOR. THIS DISCLAIMER APPLIES TO ALL WHO USE THIS SOFTWARE. THE AUTHOR HAS DONE HIS BEST TO ENSURE THAT THIS SOFTWARE IS FREE FROM DEFECTS, ALTHOUGH THE AUTHOR CANNOT GUARANTEE THIS. THE AUTHOR HEREBY REJECTS ANY LIABILITY OR RESPONSIBILITY FOR THESE OR OTHER CONSEQUENCES FROM THE USE OF THIS SOFTWARE. THIS INCLUDES, BUT IS NOT LIMITED TO, DAMAGE TO YOUR EQUIPMENT, TO YOUR DATA, TO OTHER COMPUTERS / DEVICES YOUR COMPUTER IS CONNECTED TO, PERSONNAL INJURY, FINANCIAL LOSS OR OTHER EFFECTS. THIS SOFTWARE IS PROVIDED AS-IS. THIS MEANS THE AUTHOR CANNOT GUARANTEE THAT IT IS FIT FOR ANY SPECIFIC PURPOSE AND THE AUTHOR DOES NOT GUARANTEE BUG FIXES, UPDATES OR HELP DURING ERROR RECOVERY. (After all, you did get it for free!) ------------------------------ Distribution ------------------------------ This software is emailware, which means that this archive can be freely distributed provided it's components are not altered or deleted by anyone other than the copyright holder (Andrew Bell). It also means if you use the software often you should send the author an email with some feedback. Distribution via diskette, CD-ROM or other electronic medium is allowed provided that the archive is distributed in it's original state, and that the end user is not charged for this software (although you are allowed to charge them for the medium it is supplied on, this cost must not exceed £5 UK pounds). If you are going to distribute this software via a magazine cover mounted medium, I recommend that you contact the author for the latest version of the software. The address is provided below. ------------------------------ Usage ------------------------------ To start Vivid, run it from a Shell window. That's all you need to do, no complicated Shell paramteres are required. The next time something attempts to flush the memory, the following information will be dumped to the Shell window: ·The number and date of the memory flush. ·The task pointer and name of the task that triggered the flush. ·The size of memory requested (Taken from the MemHandlerData structure). ·The flags for the requested memory (also from the MemHandlerData structure). ·The flags for the MemHandlerData structure itself. Here is an an example of the output: (START OF EXAMPLE) Vivid 1.0 (20.10.99), Copyright © 1999 Andrew Bell. All rights reserved. Vivid has been installed. Press `Control + C' to break out. A memory flush has been detected (no. 001) : Wednesday 20-Oct-99 01:23:58 Low mem handler was triggered by task: 0x785C50B8 (FlushTest) memh_RequestSize = 0xFFFFFFFF memh_RequestFlags = 0x00010002 (MEMF_CHIP, MEMF_CLEAR) memh_Flags = 0x00000000 (No flags given) (END OF EXAMPLE) The last three line that start