TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CAMERON CLARK
from: GEORGE WHITE
date: 1997-09-01 09:13:00
subject: Re: !!StackControl???

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.