Microsoft KB Archive/58436

{|
 * width="100%"|

Setting Size and Number of Internal Stacks

 * }

Q58436

-

The information in this article applies to:


 * Microsoft C for MS-DOS, versions 6.0, 6.0a, and 6.0ax
 * Microsoft C/C++ for MS-DOS, version 7.0
 * Microsoft Visual C++, versions 1.0, 1.5

-

SUMMARY
In an MS-DOS application, if an INTERNAL STACK OVERFLOW system error occurs, the number and/or size of internal stacks in MS-DOS should be increased in the CONFIG.SYS file. The syntax for this is as follows

  STACKS=number,size where number = number of stacks (8-64, default 9) and size = size of the stacks (32-512, default 128).

MORE INFORMATION
The following information was taken from &quot;The MS-DOS Encyclopedia,&quot; page 805:

  Each time certain hardware interrupts occur,. . ., MS-DOS Version 3.2 switches to an internal stack before transferring control to  the handler that will service the interrupt. In the case of nested interrupts, MS-DOS checks to ensure that both interrupts do not get the same stack. After the interrupt has been processed, the stack is released. This protects the stacks owned by application programs or system device drivers from overflowing when several interrupts occur in rapid succession. . . . If too many interrupts occur too quickly and the pool of internal stack frames is exhausted, the system halts with the message INTERNAL STACK OVERFLOW. Increasing the number parameter in the stacks command usually corrects the problem. Additional query words: kbinf 5.10 6.00 6.00a 6.00ax 7.00 1.00 1.50

Keywords : kb16bitonly

Issue type :

Technology : kbVCsearch kbAudDeveloper kbPTProdChange kbvc150 kbvc100 kbZNotKeyword3 kbCVC700DOS