PRB: Avoiding R6009 "Not Enough Space for Environment" ErrorLast reviewed: July 17, 1997Article ID: Q50714 |
5.00 5.10 6.00 6.00a 6.00ax 7.00 | 1.00 1.50
MS-DOS | WINDOWSkbprg kbfasttip kbprb The information in this article applies to:
SYMPTOMSIn the Microsoft C and Visual C++ products listed above, the following error message may be generated:
R6009: Not Enough Space For Environment CAUSEThe "R6009: Not Enough Space For Environment" run-time error is caused when a program successfully loads into memory and then attempts to load a copy of the environment and the argument list into the near heap. If the near heap does not have enough room for one, the other, or both, R6009 is generated.
RESOLUTION
The following are four ways to work around the problem:
MORE INFORMATIONIn standard Microsoft C programs, the functions _setargv() and _setenvp() attempt to set up the argument vector and the environment vector, respectively. Both of these vectors are allocated in the near heap. If the program has a full or nearly full near heap, the vectors will not be set up, thereby giving the error.
|
Additional reference words: 6.00 6.00a 6.00ax 7.00 8.00 8.00c 1.00 1.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |