Stack size with Turbo-C

John Gordon gordon at osiris.cso.uiuc.edu
Tue Dec 11 13:31:29 AEST 1990


routh at eltanin.rtp.semi.harris.com (Kevin Routh x622) writes:

>I wondered if Turbo C has any provision for adjusting the stack size.  I
>have looked through my documentation and can't find an option.  This would
>be analogous to the Microsoft C linker option /STACK:0x4000.  Thanks
>for the help.

	Yes, there is.  It is in the form of a global variable called _stklen.
In your program, before main(), just say:

	unsigned _stklen = 64000U;  /* 64K stack */

	There's probably a .h file you need to #include, but now that you
know what you're looking for, I'm sure you can find out which one.


---
John Gordon
Internet: gordon at osiris.cso.uiuc.edu        #include <disclaimer.h>
          gordon at cerl.cecer.army.mil       #include <clever_saying.h>



More information about the Comp.lang.c mailing list