FIX: OnIdle() Processing Can Hang in Low-Memory SituationsLast reviewed: September 18, 1997Article ID: Q116135 |
1.00
WINDOWS
kbprg kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSAn application that uses the Microsoft Foundation Class (MFC) library might hang in situations where memory is extremely low.
CAUSEThe MFC library does idle-time processing to attempt to reclaim available memory for its safety memory pool. This processing is done in CWinApp::OnIdle() at approximately line 540 in the module APPCORE.CPP. OnIdle() uses a while loop to attempt to reclaim this memory. However, if the available memory is sufficiently low, the entire pool cannot be reclaimed and the while loop never exits, hanging the application.
RESOLUTIONTo avoid the potential problem, do one of the following:
STATUSMicrosoft has confirmed this to be a problem in Visual C++ for Windows, version 1.0. This problem was corrected in Visual C++ 1.5. This is not a problem in Visual C++ 32-bit Edition.
MORE INFORMATIONFor more information regarding building the MFC library, refer to Appendix B in the "MFC User's Guide," provided with Visual C++ for Windows, version 1.0.
|
Additional reference words: runtime infinite loop 1.00 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |