Short:    Make tasks use a bigger stack
Author:   Andreas R. Kleinert, Kyzer/CSG
Uploader: Kyzer/CSG <kyzer@4u.net>
Type:     util/cli

If  you  get crashes from "ramlib" or IPrefs, it may be because their stack
is  too  small.  Normally you can make programs use a bigger stack by using
the  "stack"  command  before  executing them, but IPrefs and ramlib do not
work in the normal way.

There's   a   couple  of  programs  written  by  Andreas  Kleinert,  called
"RamLibPatch"  and "IPrefsPatch", which can increase the size of the ramlib
and  IPrefs  stack,  respectively.  It's  a  simple  program  he's written,
quickly,  and  it seems to work fine. But, as usual, it can be done smaller
and better in assembler.

So,  I've  made "GrowStack". It is much smaller than both those patches, it
allows  you  to  specify your own choice of stack size on the command line,
and you only need one command to apply both changes.

USAGE:

GrowStack RAMLIB/S, IPREFS/S, STACKSIZE/N/A

- If  you  want  to patch ramlib, set the RAMLIB switch, if you want to patch
  IPrefs, set the IPREFS switch. If you want to patch both, set both. Easy?

- GrowStack  requires  the  chosen  tasks  to  already  be  loaded in memory,
  otherwise  it  will  print  'object  not  found'. This is not a problem for
  ramlib,  which  is always in memory, but it does mean that to patch IPrefs,
  you have to run GrowStack _after_ IPrefs in the startup.

- There  must  be  enough  memory for the stack, otherwise it will print 'not
  enough memory'.

- It  cannot shrink stacks, only grow them. If the stack is already as big as
  (or bigger than) the size you specify, then nothing will be done.

- changing  another task's stack is not allowed, but all current Amigas allow
  it to be done, despite this rule. Changing a stack may crash or confuse the
  task  in question, causing failures. Future versions of the OS, or programs
  that enforce system rules, may cause the program to crash or fail.

SHOULD I USE THIS PROGRAM?

- If  you  never  get crashes from IPrefs or ramlib, DO NOT USE THIS PROGRAM.
  GrowStack  is not a healer, it is a fiddler and a breaker. Trying to change
  the  stack is both dependant on how the program uses the stack AND at which
  time  the  stack  change  is  performed. The idea is that hopefully the end
  justifies the means.

- If  you  occasionally  get  crashes  from  IPrefs or ramlib, try using this
  program  as specified, and perform whatever you did to make it crash. If it
  nolonger crashes, great. If not, DO NOT USE THE PROGRAM.


INSTALLATION:

To  perform  both  the  IPrefsPatch and RamLibPatch, put these two lines in
your s:startup-sequence, exactly as written, just after IPrefs is started:

GrowStack IPREFS RAMLIB 16384

This makes IPrefs and ramlib both have 16Kb stacks instead of 2k/3k stacks.

Requires 2.0 or better.

****************************************************************************
*          THIS PROGRAM IS PART OF THE "KYZER'S SMALLS" COLLECTION         *
*                                                                          *
*      The KyzSmlClxn is a set of very small, but useful CLI commands.     *
*                                                                          *
*   Source in assembler is included. Install by copying the command to C:  *
*                                                                          *
*     Kyzer/CSG, 49 Fairview Road, AB22 8ZG, Scotland ---- kyzer@4u.net    *
****************************************************************************


============================= Archive contents =============================

Original  Packed Ratio    Date     Time    Name
-------- ------- ----- --------- --------  -------------
     364     334  8.2% 10-Aug-98 19:18:00  GrowStack
    3151    1420 54.9% 10-Aug-98 19:17:46  GrowStack.asm
    3540    1566 55.7% 11-Aug-98 17:04:40  GrowStack.readme
-------- ------- ----- --------- --------
    7055    3320 52.9% 18-Aug-98 20:47:28   3 files
