home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!sokoloff
- From: sokoloff@athena.mit.edu (James T Sokoloff)
- Subject: Re: Specifying stack size in Think C 5.03?
- Message-ID: <1992Nov23.185045.4945@athena.mit.edu>
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: w20-575-40.mit.edu
- Organization: Massachusetts Institute of Technology
- References: <z5nqw7+@lynx.unm.edu>
- Distribution: usa
- Date: Mon, 23 Nov 1992 18:50:45 GMT
- Lines: 22
-
- In article <z5nqw7+@lynx.unm.edu> espen@leo.unm.edu (Peter Espen) writes:
- > I am using Think C 5.03 to run some generic C programs using the
- >console window and the ccommand() function. The programs that I am running
- >are not that large, but they do have functions that are highly recursive.
- >I find myself running out of memory when the recursion starts getting pretty
- >deep. Is there a way in Think C 5.03 to specify the size of the stack??
- >
- > Peter Espen
- > espen@leo.unm.edu
- >
- I'm not sure if this is the correct way to do it. (Higher net.gods should
- correct me if I'm wrong.) In your main(), do the following:
-
- SetApplLimit( GetApplLimit() - 32768L);
-
- This should "reserve" 32K more for the stack, at expense of the max heap
- size.
-
- I believe it should be called before: MaxApplZoom( certainly!) and I think
- before toolbox Init & MoreMasters()... But I'm not a net.god...
-
- ---Jim Sokoloff
-