home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!grobbins
- From: grobbins@Apple.COM (Grobbins)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: How to increase stack size ???
- Summary: Don't try to fix a specific stack size
- Message-ID: <71983@apple.Apple.COM>
- Date: 4 Sep 92 03:25:10 GMT
- References: <1992Sep2.154822.12924@novell.com> <71922@apple.Apple.COM> <1992Sep3.180837.8540@novell.com>
- Organization: Apple Computer Inc., Cupertino, CA
- Lines: 33
-
- In article <1992Sep3.180837.8540@novell.com> damurphy@wc.novell.com (Duane A Murphy) writes:
- >This increases the stack size by an amount. It does not _SET_ the stack
- >size. I needed (as I believe the original author did) to set the
- >stack size to a particular size.
-
- The original poster wanted to be guaranteed at least a 32K stack
- regardless of the application's partition size setting.
-
- It is not a good idea to set the stack to a specific size (although it
- can be done by setting ApplLimit to CurStackBase minus the desired size)
- because the System may decide to make demands of your stack beyond
- the normal default. It can do so safely by just upping the default
- stack and partition sizes when launching.
-
- This happened with the introduction of Color QuickDraw. Additional
- stack space was necessary for safe QuickDraw use, so the default stack
- size was upped to 24K and the partition size of each application was
- increased upon launch to accomodate the larger stack.
-
- Any application which sets a specific stack size after launching
- defeats the ability of System software to increase the stack.
- At the time the program is written, 16K may be plenty large for the
- stack, but that may not be true for the same program under some
- future version of System software.
-
- For this reason, DTS has for some time advocated that the stack be
- increased when necessary (by lowering ApplLimit), but not fixed to
- a specific size.
-
- Grobbins grobbins@apple.com
-
- Usual disclaimers apply.
-
-