Hi Cameron,
CC>AT> Q. How do I change the stack size?
CC>AT> A. The size of the stack of a Turbo C++ program is determined at
CC>AT> run time by the global variable _stklen. To change the size
CC>AT> to, for example, 10,000 bytes, include the following line in
CC>AT> your program:
CC>AT>
CC>AT> extern unsigned _stklen = 10000;
CC> That's the strangest thing I've ever seen (runtime adjustment).
CC> Are there any sideffects to changing the variable at different
CC> places?
It's only used in the startup code (before main() is called) so even if
it is changed during run time the change has no effect. It's a way of
making it easy for the programmer to set up the stack size.
George
* SLMR 2.1a * Computers eliminate spare time.
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)
|