Category : C Source Code
Archive   : BCPPTECH.ZIP
Filename : TI813.ASC

 
Output of file : TI813.ASC contained in archive : BCPPTECH.ZIP







PRODUCT : Turbo C++, Borland C++ NUMBER : 813
VERSION : All
OS : DOS
DATE : February 25, 1992 PAGE : 1/1

TITLE : Dealing with Stack Overflow Problems




Symptoms of stack overflow are numerous. They include program
crashing, returning to wrong address, local/global variables
getting corrupted, and so on. The default size for the stack is
4096 bytes, or 4K. To increase the size of the stack, the
_stklen variable is used.

Here's how to make the assignment:

extern unsigned _stklen = xxxxx;

where xxxx is a number between 256 - 65535 bytes.

The variable must be declared in the global memory location in
the program, and you must include dos.h. You will get a
duplicate symbol declaration warning from the linker, which you
may ignore.

Note: The linker map will still report the stack as being 4K,
even though you changed it's size. The helpme!.doc also
describes how to increase the stack length.































  3 Responses to “Category : C Source Code
Archive   : BCPPTECH.ZIP
Filename : TI813.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/