Xref: news2.mv.net comp.os.msdos.djgpp:5739 From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: What if I run out of store? Date: Mon, 08 Jul 1996 11:39:07 CDT Organization: Rice University, Houston, Texas Lines: 13 Message-ID: <31e139ab.sandmann@clio.rice.edu> References: Reply-To: sandmann AT clio DOT rice DOT edu NNTP-Posting-Host: clio.rice.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > > (2) How can I trap the error condition of the stack running out of space? > AFAIK, you can't. The main reason is that there is no such error > condition. When the stack overflows, it just begins overwriting the > heap. How fast and how hard will this cause a crash, depends on the program. In V1.x under DPMI, a separate SS was set up which had an expand down limit to catch these problems. This prevented code from being compiled with -fomit-frame-pointer, but did give a nice stack fault when you ran out of stack. I have a V2 subroutine I wrote back in the pre-V2 beta days which can implement this. I'm not sure what it might break in the libc. Maybe I'll try and find it. At one time the plan was to make this yet another crt0 option. Humm, maybe I just though of a unique way to work around the NT farptr problem ;-) Heh heh...