weisen@eniac.seas.upenn.edu (Neil Weisenfeld) (06/29/90)
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... =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=