diff index.cpp @ 512:6439cfba2524 memory-leaks

Implemented correct LSH table via compile-time switch -DLSH_DUMP_CORE_TABLES. Dumps on LSH load.
author mas01mc
date Fri, 23 Jan 2009 18:45:44 +0000
parents 920919d62542
children
line wrap: on
line diff
--- a/index.cpp	Sun Jan 11 04:24:24 2009 +0000
+++ b/index.cpp	Fri Jan 23 18:45:44 2009 +0000
@@ -216,9 +216,9 @@
       
       // Insert up to lsh_param_b database tracks
       index_insert_tracks(startTrack, endTrack, &fvp, &sNorm, &snPtr, &sPower, &spPtr);
-
+      
       // Serialize to file (merging is performed here)
-      lsh->serialize(mergeIndexName, lsh_in_core?O2_SERIAL_FILEFORMAT2:O2_SERIAL_FILEFORMAT1); // Serialize core LSH heap to disk
+      lsh->serialize(mergeIndexName, lsh_in_core?O2_SERIAL_FILEFORMAT2:O2_SERIAL_FILEFORMAT1); // Serialize core LSH heap to disk    
       delete lsh;
       lsh = 0;
     }
@@ -506,6 +506,9 @@
     else
       VERB_LOG(1,"INDEX: loading hash tables into core %s\n", (lsh->get_lshHeader()->flags&O2_SERIAL_FILEFORMAT2)?"FORMAT2":"FORMAT1");
     lsh = index_allocate(indexName, true);
+#ifdef LSH_DUMP_CORE_TABLES
+    lsh->dump_hashtables();
+#endif
   }
   
   delete[] indexName;