- /**
- * Second pass: check tables
- */
-/* p=bwtEndPos;
- textId = numberOfTexts;
- for (ulong i=n-1;i<ulongmax;i--) {
- x=(i==n-1)?0:i+1;
-
- if (sampled->access(p)) {
- ulong j = sampled->rank1(p)-1;
- assert((*suffixDocId)[j] == DocIdAtTextPos(textStartPos, x));
-
- // calculate offset from text start:
- assert((*suffixes)[j] == x - (*textStartPos)[(*suffixDocId)[j]]);
- }
-
- uchar c = alphabetrank->access(p, alphabetrank_i_tmp);
-
- if (c == '\0')
- {
- --textId;
- // LF-mapping from '\0' does not work with this (pseudo) BWT (see details from Wolfgang's thesis).
- p = textId; // Correct LF-mapping to the last char of the previous text.
- }
- else // Now c != '\0', do LF-mapping:
- p = C[c]+alphabetrank_i_tmp-1;
- }
- assert(textId == 0);
- delete textStartPos
-*/
+#ifdef DEBUG_MEMUSAGE
+ std::cerr << "heap usage after sampled arrays: " << HeapProfiler::GetHeapConsumption()/(1024*1024) << " / " << HeapProfiler::GetMaxHeapConsumption()/(1024*1024) << " Mbytes, " << HeapProfiler::GetHeapConsumption() << " / " << HeapProfiler::GetMaxHeapConsumption() << std::endl;
+ HeapProfiler::ResetMaxHeapConsumption();
+#endif