- while (m_pMem == NULL && nTargetSize >= 512 * 1024 * 1024 )
- {
- nTargetSize -= 16 * 1024 * 1024;
- m_pMem = new (nothrow) unsigned char[nTargetSize];
+ while (m_pMem == NULL && nTargetSize >= 512 * 1024 * 1024 ) {
+#ifdef _MEMORYDEBUG
+ printf("failed!\n");
+ printf("Allocating %i bytes of memory (backup) - ", nTargetSize);
+#endif
+ nTargetSize -= 16 * 1024 * 1024;
+ m_pMem = new (nothrow) unsigned char[nTargetSize];