Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!ruuinf!ruunsa!boogaard From: boogaard@ruunsa.fys.ruu.nl (Martin vdBoogaard) Newsgroups: comp.lang.c Subject: _stklen in Turbo C Keywords: stack, DOS, Turbo, Borland Message-ID: <1921@ruunsa.fys.ruu.nl> Date: 5 Feb 91 17:36:25 GMT Organization: University of Utrecht, Dept. of Physics Lines: 23 For a variety of reasons I'd like to be able to compile (on a DOS machine with Turbo C) with a stack that is larger than the usual 4kB. The manual (yes, I *have* read the FM) says I should simply set _stklen (defined in dos.h) to the desired value. I just can't find out where. If I put e.g. _stklen = 10000; at the start of main (), nothing happens, i.e. when I deliberately cause a stack overflow by some silly recursion, the number of times my stack-consuming function can call itself before triggering the `Stack overflow!' run-time error is always the same. (I can even make _stklen 0 if I like.) Actually, I don't understand how a program would be able to change its own stack size at run time. Is this really what happens (or, in my case, doesn't happen)? Who has a working example of how to do this? Thanks, Martin J. van den Boogaard | Dept. of Atomic & Interface Physics | Debye Institute--Utrecht University boogaard@fys.ruu.nl | P.O. Box 80.000, NL-3508 TA Utrecht boogaard@hutruu51.bitnet | the Netherlands, +31 30 532904 ------------------------------------------------------------------------