home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!swrinde!zaphod.mps.ohio-state.edu!howland.reston.ans.net!spool.mu.edu!olivea!apple!goofy!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
- From: REEKES@applelink.apple.com (Jim Reekes)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: bg-only, stack size
- Message-ID: <REEKES-250193123820@90.10.20.67>
- Date: 25 Jan 93 20:39:37 GMT
- References: <1jplelINNt88@shelley.u.washington.edu>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.programmer
- Organization: Apple Computer, Inc.
- Lines: 36
-
- In article <1jplelINNt88@shelley.u.washington.edu>, stevep@wrq.com (Steve
- Poole) wrote:
- >
- > Can anyone offer an explanation of what happens differently for background-
- > only applications where the stack is concerned? My bg-only app comes up with
- > a 2K stack -- not enough! Clearing the bg-only bit brings it up with 24K
- > of stack. I've tried increasing the stack size by using SetApplLimit with
- > the address of the stack base - desired stack size, which seems to work fine
- > iff the bg-only bit isn't set. MemError isn't being set in either case.
- > Help!
- >
- > Is there ANY documentation on bg-only besides the few words in the process
- > manager docs? I'd appreciate pointers to anything! Thanks.
-
- There is a Tech Note or Q&A item from MacDTS about this. Faceless
- background only applications will only get a 2k stack by default, since
- most of the stack that's used is required for QuickDraw. Faceless tasks by
- definition don't use QuickDraw and there for the Process Manager (and even
- the older MultiFinder) only allocates a 2k stack for them. Back/White
- QuickDraw machines get an 8k stack whereas color machines get a 24k stack.
- These numbers are subject to change, so don't depend on them.
-
- If you need to increase the stack, increase it for the amount you need.
- Don't assume you know what the default stack size is.
-
- Background only applications work just like regular apps. They just don't
- use QuickDraw. (e.g. don't call InitWindows, etc.) There's also a Tech Note
- or Q&A item about how to increase the stack and it works for any type of
- application.
-
- -----------------------------------------------------------------------
- Jim Reekes, Polterzeitgeist | Macintosh Toolbox Engineering
- | Sound Manager Expert
- Apple Computer, Inc. | "All opinions expressed are mine, and do
- 20525 Mariani Ave. MS: 81-KS | not necessarily represent those of my
- Cupertino, CA 95014 | employer, Apple Computer Inc."
-