🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #777

Re: Increase run-time stack size

#777
From: Neil Weisenfeld
Date: Thu, 28 Jun 1990 23:33
33 lines
1784 bytes
In article <32559@ut-emx.UUCP> ycy@walt.cc.utexas.edu (Joseph Yip) writes:
>Hi,
>
>I have not been programming pc for some time. I am using Microsoft C
>Version 5 to compiler some C code. I run into stack overflow  during
>run-time. The problem is due to the size of arrays I declare.
>
>Please give me some hints to avoid stack overflow. As I recall,
>one can put a stack size in main() file or use switches to specify 
>stack size during linking.
>
>Thank you.
>
>- Joseph

You can link with the /STACK option:
  link xx.obj yyy.obj,,,zzz.lib/STACK:10000;

will give you a 10000 byte stack space.  You can also use the EXEMOD
program to expand the stack size of an executable without re-linking.

Under MSC 6.00, I think that EXEMOD has a different name.

-Neil

(just my hopefully correct $0.02)


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Neil I.  Weisenfeld                    | InterNet: weisen@eniac.seas.upenn.edu
Dept. of Computer and Info. Sciences   | USPS: I dunno, I'm moving...
University of Pennsylvania             | PENNmail: Don't even try it...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <26574@netnews.upenn.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!eniac.seas.upenn.edu!weisen
References: <32559@ut-emx.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!eniac.seas.upenn.edu!weisen
From: weisen@eniac.seas.upenn.edu (Neil Weisenfeld)
Newsgroups: comp.sys.ibm.pc.programmer,comp.sys.ibm.pc
Subject: Re: Increase run-time stack size
Message-ID: <26574@netnews.upenn.edu>
Date: 28 Jun 90 23:33:44 GMT
References: <32559@ut-emx.UUCP>
Sender: news@netnews.upenn.edu
Reply-To: weisen@eniac.seas.upenn.edu.UUCP (Neil Weisenfeld)
Organization: University of Pennsylvania
Lines: 33