KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q58436: Setting Size and Number of Internal Stacks

Article: Q58436
Product(s): See article
Version(s): 3.x 4.x 5.00 5.10
Operating System(s): MS-DOS
Keyword(s): ENDUSER | s_quickc s_quickasm s_quickpas s_pascal | mspl13_c
Last Modified: 9-FEB-1990

If an INTERNAL STACK OVERFLOW system error occurs, the number and/or
size of internal stacks in 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).

The following information was taken from the MS-DOS Encyclopedia, 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.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.