Changeset 7582 for trunk/indexers/mg/src/text/ivf.pass1.c
- Timestamp:
- 2004-06-10T15:02:05+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/indexers/mg/src/text/ivf.pass1.c
r3745 r7582 45 45 /* 46 46 $Log$ 47 Revision 1.2 2004/06/10 03:02:05 kjdon 48 fixed the bug that was causing it not to be able to create a second index using jni - basically had to reset all the static variables at the start of each pass. the tricky thing to find was the static variables in occur_to_lexical in ivf.pass2 49 47 50 Revision 1.1 2003/02/20 21:18:23 mdewsnip 48 51 Addition of MG package for search and retrieval … … 123 126 hash_rec; 124 127 125 126 127 128 129 130 131 132 128 static unsigned long words_read = 0, words_diff = 0, bytes_diff = 0; 133 129 static unsigned long outputbytes = 0; … … 142 138 143 139 static hash_rec **HashTable; 144 static unsigned long HashSize ;145 static unsigned long HashUsed ;140 static unsigned long HashSize=0; 141 static unsigned long HashUsed=0; 146 142 static u_char *Pool; 147 static int PoolLeft ;143 static int PoolLeft=0; 148 144 149 145 static hash_rec *hr_pool; 150 static int hr_PoolLeft ;146 static int hr_PoolLeft=0; 151 147 152 148 static hash_rec **first_occr; 153 static int max_first_occr ;149 static int max_first_occr=0; 154 150 155 151 static mg_ullong L1_bits = 0; … … 161 157 static unsigned long callnum = 0, lcallnum = 0, wordnum = 0, lwordnum = 0; 162 158 static unsigned long ptrcnt = 0; 163 static unsigned long checknum ;159 static unsigned long checknum=0; 164 160 static long max_mem = 0; 165 161 … … 173 169 } 174 170 175 176 171 void 172 ResetStaticI1Vars () 173 { 174 words_read = 0; 175 words_diff = 0; 176 bytes_diff = 0; 177 outputbytes = 0; 178 inputbytes = 0; 179 MaxMemInUse = 0; 180 MemInUse = 0; 181 ChunksWritten = 0; 182 183 HashSize=0; 184 HashUsed=0; 185 PoolLeft=0; 186 187 hr_PoolLeft=0; 188 189 max_first_occr=0; 190 191 L1_bits = 0; 192 L2_bits = 0; 193 L3_bits = 0; 194 L1_ohead = 0; 195 L2_ohead = 0; 196 L3_ohead = 0; 197 callnum = 0; 198 lcallnum = 0; 199 wordnum = 0; 200 lwordnum = 0; 201 ptrcnt = 0; 202 checknum=0; 203 max_mem = 0; 204 205 } 177 206 int 178 207 init_ivf_1 (char *file_name) 179 208 { 209 ResetStaticI1Vars(); 180 210 if (!(ic = create_file (file_name, INVF_CHUNK_SUFFIX, "wb", MAGIC_CHUNK, 181 211 MG_MESSAGE))) /* [RPAP - Feb 97: WIN32 Port] */ … … 784 814 } 785 815 786 787 788 789 816 int 790 817 done_ivf_1 (char *FileName) … … 822 849 msg_prefix = temp_str; 823 850 851 /* free the memory */ 852 Xfree(HashTable); 853 if (Pool) { 854 Pool -= (POOL_SIZE-PoolLeft); 855 Xfree(Pool); 856 } 857 if (hr_pool) { 858 hr_pool -= (HASH_POOL_SIZE-hr_PoolLeft); 859 Xfree(hr_pool); 860 } 861 if (first_occr) { 862 Xfree(first_occr); 863 } 864 824 865 return (COMPALLOK); 825 866 } /* done_encode */
Note:
See TracChangeset
for help on using the changeset viewer.