+ if(m_pIndex != NULL) {
+ delete m_pIndex;
+ m_pIndex = NULL;
+ }
+#ifdef _MEMORYDEBUG
+ printf("Allocating %u MB memory for RTIReader::m_pIndex", nIndexFileLen / 11 / (1024 * 1024));
+#endif
+ m_pIndex = new (nothrow) IndexChain[nIndexFileLen / 11];
+ if(m_pIndex == NULL) {
+ printf("\nFailed allocating %i MB memory.\n", nIndexFileLen / 11 / (1024 * 1024));
+ exit(-2);
+ }
+#ifdef _MEMORYDEBUG
+ printf(" - success!\n");
+#endif