🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #8071

Re: setting stack size under BC4.5

#8071
From: me
Date: Fri, 27 Oct 2000 23:44
24 lines
2124 bytes
Steve Summit <scs@eskimo.com> wrote:
> In article <8tb0mj$j4s$1@news.chorus.net>, Joe Hagen
> <jdhagen@chorus.net> writes:
>>[I had written:]
>>> This ought to be an easy question, but I'm drawing a blank
>>> digging through the documentation.  What's the right way to
>>> set a non-default (i.e. bigger, to avoid overflows) stack size
>>> under BC++ 4.5?
>> 
>> In your main module put the following line
>> at file scope:
>>    extern unsigned _stklen=xxxx;

> Thanks.  As a matter of fact, I had tried that, but since I
> wasn't sure it was right and it didn't seem to help, I didn't
> mention it at first.

> There are two possible reasons for a stack overflow, of course.
> One is that the stack isn't big enough for the call depth of your
> program, and one is that you've got an infinitely recursive call,
> that will chew up any stack, no matter how big. 

There's a third (a fake one) and that only happens if you're using 
ISR's.  In that case, you just need to disable stack checking.
Technical Details
Message-ID: <8td40k$fvv$3@schbbs.mot.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.xnet.com!newsgate.mot.com!newshost.mot.com!schbbs.mot.com!not-for-mail
References: <8tavlc$ibh$1@eskinews.eskimo.com> <8tb0mj$j4s$1@news.chorus.net> <8tctr2$2tt$1@eskinews.eskimo.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f6aa,c6b41702e6080d53
X-Google-Attributes: gid10f6aa,public
X-Google-Thread: fa69e,c6b41702e6080d53
X-Google-Attributes: gidfa69e,public
X-Google-ArrivalTime: 2000-10-27 17:10:04 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.xnet.com!newsgate.mot.com!newshost.mot.com!schbbs.mot.com!not-for-mail
From: me@here.com
Newsgroups: comp.os.msdos.programmer,borland.public.cpp.borlandcpp
Subject: Re: setting stack size under BC4.5
Date: 27 Oct 2000 23:44:20 GMT
Organization: Plug 'n' Pray!
Lines: 28
Message-ID: <8td40k$fvv$3@schbbs.mot.com>
References: <8tavlc$ibh$1@eskinews.eskimo.com> <8tb0mj$j4s$1@news.chorus.net> <8tctr2$2tt$1@eskinews.eskimo.com>
NNTP-Posting-Host: css31u.seattle.css.mot.com
X-Trace: schbbs.mot.com 972690260 16383 199.1.163.31 (27 Oct 2000 23:44:20 GMT)
X-Complaints-To: postmaster@mot.com
NNTP-Posting-Date: 27 Oct 2000 23:44:20 GMT
User-Agent: tin/pre-1.4-19990216 ("Styrofoam") (UNIX) (SunOS/5.7 (sun4u))