Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!sun-barr!decwrl!ucbvax!CIM-VAX.HONEYWELL.COM!derstad From: derstad@CIM-VAX.HONEYWELL.COM ("DAVE ERSTAD") Newsgroups: comp.sys.apollo Subject: Re: GUARD FAULT ? Message-ID: <8912141627.AA09068@umix.cc.umich.edu> Date: 13 Dec 89 14:18:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 25 > Does anyone know what a GUARD FAULT is ?. I got it in a deeply recursive > routine on an DN-4000, SR 0.1, bsd4.2. The same program runs ok on a SUN. Too much junk on the stack, usually. Another message you might get is unable to unwind stack because of invalid stack frame Generally, I have found the "guard fault" is issued when procedures have large local storage, and the "invalid stack frame" when the recursion is very, very deep (for example, 10,000 deep). If you can move some data items which are local to the recursive routine into a global area, or mark them as STATIC that will help. The maximum stack size is 262144 bytes. This means you can call a procedure with about a quarter meg of local storage, or recurse twice on a procedure with about 0.12 MB, recurse three times on 0.08 MB, etc. I have no idea where the limit comes from. It seems pretty silly to have 64 MB or whatever of address space and limit applications to such a small stack space. Maybe someone at Apollo can shed some light?... Dave Erstad Honeywell SSEC DERSTAD@cim-vax.honeywell.com