The information in this article applies to:
SYMPTOMSAn attempt to run an application fails and the run-time library generates the following message:
CAUSE
There are two causes for this error:
RESOLUTION
To address the first cause above, perform one or more of the
following:
Please refer below for more information about the causes of this error, methods to address the problem, and a method to determine which of the causes above is relevant to a given situation. MORE INFORMATIONCase 1: R6000 Occurs While Application RunningThe stack overflows because the application attempts to push too much data (either function-return addresses or local data) on the stack. Each time a function call is made, the caller pushes the return address on the stack with any parameters. The called function may also allocate stack-based data for its own use. Each process requires stack space.To address the R6000 error, perform one of the following:
Case 2: R6000 Occurs at StartupThe startup code allocates stack space in the DGROUP segment. If DGROUP does not contain enough free space for the stack (by default, 2K), the startup code fails and generates the R6000 error.To address this situation, either reduce the size of the stack or reduce the amount of data stored in DGROUP. To reduce the stack size, compile with the /F <x> option, link with the /STACK:<x> option, or use the EXEMOD utility, as described above. To reduce the amount of data stored in DGROUP, compile the code in a large-data memory model (compact, large, or huge memory model) instead of a small-data memory model (small or medium memory model). If you are already using a large- data memory model, specify the /Gt compiler option switch to move data from DGROUP into far data segments. To use the /Gt option, specify /Gt<x>, where <x> is a decimal number of bytes. Data items larger than <x> bytes are placed into a separate data segment which creates room in DGROUP for the stack. Determining the Cause of the R6000 ErrorThe CodeView debugger provides an excellent method to determine the cause of the problem. After starting CodeView and specifying your application, execute to the beginning of the main() function by doing one of the following:
Additional query words: 1.00 1.50 6.00 6.00a 6.00ax 7.00
Keywords : kb16bitonly |
Last Reviewed: January 3, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |