I write an application that will process large files. When the files to be processed is too large, the application will be aborted in some stages and throw out a CMemoryException which contains error information "Out of memory".
I want to find out which statement is most likely cause this problem. And which types of allocation will consume most of the memory. However, it seems impossible to catch exceptions for every memory allocation statement.
Is there a good way to trace into the "Out of memory" problem? I am using Visual C++ 6.0