home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14974 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.9 KB

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