home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gossip.pyramid.com!olivea!apple!apple!cambridge.apple.com!bill@cambridge.apple.com
- From: bill@cambridge.apple.com (Bill St. Clair)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Re: Stack Overflow Error
- Message-ID: <9208171856.AA04152@cambridge.apple.com>
- Date: 17 Aug 92 19:58:57 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 31
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Full-Name: Bill St. Clair
- Original-To: frege@eecs.umich.edu
- Original-Cc: info-mcl
-
- > Here is what I get:
- >
- >> Error: Stack overflow.
- >> While executing: #<STANDARD-METHOD FOCUS-VIEW (SIMPLE-VIEW)>
- >> Type Command-. to abort.
- >
- > Is there a way to set the size of the system stack space?
- >
- >- Young-pa So
-
- There is a way, but I doubt very much that it will help. The stack
- almost always overflows because your code is doing infinite recursion,
- not because it needs more stack. Look at the output of:
-
- (print-call-history)
-
- or use the Stack Backtrace dialog and look for a function that is called
- multiple times with the same arguments. If you are indeed using up the stack
- because of code that needs a huge amount of it, page 5 of the MCL 2.0 Release
- Notes documents the :STACK-MAXIMUM and :STACK-MINIMUM keywords for the
- :MEMORY-OPTIONS argument to SAVE-APPLICATION. You can also change these
- values by editing the 'LSIZ' resource with ResEdit.
-
- If you are still stumped, send me the output (or part of the output, it
- will be long) from (print-call-history).
-
- P.S. There is one other place that can sometimes cause stack overflow
- even without infinite recursion. Code that recurses on both the
- CAR and CDR of a list will often stack overflow when given a long
- list as an argument. This code should be rewritten to recurse on
- the CAR and iterate (often via a tail-call) on the CDR.
-