Short: Set minimum stack size for new processes Author: stackattack@rycochet.com (Robin Cloutman) Uploader: thorsten cd32-allianz de (Thorsten Schölzel) Type: util/boot Version: 2.9 Architecture: m68k-amigaos >= 2.0.0 Date: 2006-01-26 StackAttack ----------- If you are running many programs that patch system functions (such as commodities and hacks) it might happen that sometimes your machine crashes without real "motivation". This is often caused by a too low stack of many programs (because of the patched routines increasing the stack usage of the corresponding system function). StackAttack tries to kill these GURUs by patching CreateProc(), CreateNew- Proc(), RunCommand() and SystemTagList(). It alters the stack passed to these routines depending on what parameters you supply to StackAttack. StackAttack allows you to set a minimum stack size a new process (program) shall have and also by how much bytes you want to increase the stack further StackAttack1 is ©Copyright 1997-2001 by Georg Steger. All rights reserved! ============ StackAttack2 ------------ Some time ago I decided to write a new version of StackAttack to address some of the issues I found in the old one - namely that if you wanted to change the amount of stack used, you had to apply *another* patch, using up memory, and making new program start slightly slower... Not to mention needing more stack on every program to deal with the fact it was another patch ;-) This version is different. It puts the patch in memory, with a named port, so if you ever want to change the stack used it will change the value used by the patch already in there. As a side effect it is also a *little* bit smaller ;-) The patch in memory is about 430 bytes long, it will check if there's enough free stack to call the patch function (which is only an extra 20 or so bytes anyway - but better safe than sorry ;-) Installation ------------ At the moment you should install by hand. 1. Copy StackAttack or StackAttack_020 to C: 2. In S:startup-sequence, directly after the SetPatch line, add "StackAttack" (minus quotes) 3. In S:startup-sequence, directly before the LoadWb line, add 3. "StackAttack AUTO" (minus quotes again) 4. Type "StackAttack AUTO" into a CLI 5. That's it, no need to reboot or anything ;-) Args ---- StackAttack MINSTACK=MIN/N,ADDSTACK=ADD/N,AUTOSTACK=AUTO/S,NOTCLI/S,SHOW/S: NOTE: "ADDSTACK=ADD/N" is only there for compatability with the old version, unless you really have less than a single meg ram, don't use it! History ------- 2.0 - First new version, 100% asm, replacates old StackAttack. 2.1 - Changed the patch code to make it smaller/faster and more robust. 2.2 - Added IGNORE/K to ignore named tasks that should know what to set the stack. (Note, it checks the *new* prog, not the calling one!) 2.3 - Added a stackcheck function, so the patched function isn't called if there isn't enough free stack. 2.4 - Removed IGNORE/K as nobody used it ;-) 2.5 - Did the SystemTagList workaround from 1.3 (old version). 2.6 - No args gives default 8192 byte MINSTACK. 2.7 - Added SHOW/S to see settings. Changed MINSTACK and ADDSTACK so no longer /K 2.8 - Added NOTCLI/S, by default also sets the same as "Stack", extra checking for ADDSTACK/N 2.9 - Added AUTOSTACK/S, sets the stack depending on the amount of memory you have, default 8192, >16 megs = 16k, >32 megs = 32k, >64 megs = 64k, >128 megs = 128k.