This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
#define EXPAND_TO_BOUNDARY | ( | x | ) | (((x) + 3) & (~3)) |
Definition at line 58 of file svdhash.h.
Referenced by CHashPage::GetStats(), and CHashPage::HeapAlloc().
#define HF_CACHE_CLEAN 1 |
Definition at line 182 of file svdhash.h.
Referenced by CHashFile::FlushCache(), CHashFile::ReadCache(), and CHashFile::RebuildDirectory().
#define HF_CACHE_EMPTY 0 |
Definition at line 181 of file svdhash.h.
Referenced by CHashFile::AllocateEmptyPage(), CHashFile::InitCache(), CHashFile::Insert(), and CHashFile::ReadCache().
#define HF_CACHE_UNPROTECTED 2 |
Definition at line 183 of file svdhash.h.
Referenced by CHashFile::CreateFileSet(), CHashFile::FlushCache(), CHashFile::Insert(), and CHashFile::Remove().
#define HF_CACHE_UNWRITTEN 3 |
#define HF_FIND_END HP_DIR_EMPTY |
Definition at line 179 of file svdhash.h.
Referenced by cache_del(), cache_get(), cache_put(), dbclean_RemoveStaleAttributeNames(), dbclean_RenumberAttributes(), CHashTable::FindFirst(), CHashTable::FindFirstKey(), CHashFile::FindFirstKey(), CHashTable::FindNext(), CHashTable::FindNextKey(), CHashFile::FindNextKey(), hash_firstentry(), hash_firstkey(), hash_nextentry(), hash_nextkey(), hashdeleteLEN(), hashfindLEN(), hashreplall(), hashreplLEN(), vattr_delete_LEN(), vattr_find_LEN(), vattr_first(), vattr_next(), and vattr_rename_LEN().
#define HF_FIND_FIRST HP_DIR_EMPTY |
#define HF_OPEN_STATUS_ERROR -1 |
Definition at line 230 of file svdhash.h.
Referenced by cache_init(), dbconvert(), init_dbfile(), main(), and CHashFile::Open().
#define HF_OPEN_STATUS_NEW 0 |
Definition at line 231 of file svdhash.h.
Referenced by dbconvert(), load_game(), main(), and CHashFile::Open().
#define HF_OPEN_STATUS_OLD 1 |
Definition at line 232 of file svdhash.h.
Referenced by dbconvert(), load_game(), and CHashFile::Open().
#define HF_SIZEOF_FILEOFFSET sizeof(HF_FILEOFFSET) |
#define HF_SIZEOF_PAGE (3*LBUF_BLOCKED) |
Definition at line 32 of file svdhash.h.
Referenced by CHashFile::CreateFileSet(), CHashFile::InitCache(), CHashFile::Insert(), CHashFile::Open(), and CHashFile::RebuildDirectory().
#define HP_DIR_DELETED (UINT_OFFSET_MAX_VALUE-1) |
Definition at line 90 of file svdhash.h.
Referenced by CHashPage::Defrag(), CHashPage::FindFirst(), CHashPage::FindFirstKey(), CHashPage::FindNext(), CHashPage::FindNextKey(), CHashPage::GetStats(), CHashPage::HeapAlloc(), CHashPage::HeapCopy(), CHashPage::HeapFree(), CHashPage::HeapUpdate(), CHashPage::Insert(), and CHashPage::Split().
#define HP_DIR_EMPTY UINT_OFFSET_MAX_VALUE |
Definition at line 89 of file svdhash.h.
Referenced by CHashPage::Empty(), CHashTable::FindFirst(), CHashPage::FindFirst(), CHashTable::FindFirstKey(), CHashFile::FindFirstKey(), CHashPage::FindFirstKey(), CHashTable::FindNext(), CHashPage::FindNext(), CHashTable::FindNextKey(), CHashFile::FindNextKey(), CHashPage::FindNextKey(), and CHashPage::HeapAlloc().
#define HP_INSERT_ERROR_FULL 2 |
#define HP_INSERT_ERROR_ILLEGAL 3 |
Definition at line 156 of file svdhash.h.
Referenced by CHashTable::Insert(), CHashFile::Insert(), and CHashPage::Insert().
#define HP_INSERT_SUCCESS 1 |
Definition at line 154 of file svdhash.h.
Referenced by CHashPage::Defrag(), and CHashPage::Insert().
#define HP_INSERT_SUCCESS_DEFRAG 0 |
Definition at line 153 of file svdhash.h.
Referenced by CHashTable::Insert(), and CHashPage::Insert().
#define HP_MIN_HEAP_ALLOC HP_SIZEOF_HEAPNODE |
#define HP_NIL_OFFSET UINT_OFFSET_MAX_VALUE |
Definition at line 85 of file svdhash.h.
Referenced by CHashPage::Empty(), and CHashPage::HeapAlloc().
#define HP_SIZEOF_DIRINDEX sizeof(HP_DIRINDEX); |
#define HP_SIZEOF_HEAPLENGTH sizeof(HP_HEAPLENGTH) |
#define HP_SIZEOF_HEAPNODE sizeof(HP_HEAPNODE) |
Definition at line 110 of file svdhash.h.
Referenced by CHashPage::GetStats(), and CHashPage::HeapAlloc().
#define HP_SIZEOF_HEAPOFFSET sizeof(HP_HEAPOFFSET) |
#define HT_SIZEOF_PAGE (1*LBUF_BLOCKED) |
Definition at line 31 of file svdhash.h.
Referenced by CHashTable::Init(), and CHashTable::Insert().
#define IS_HP_SUCCESS | ( | x | ) | ((x) <= HP_INSERT_SUCCESS) |
Definition at line 157 of file svdhash.h.
Referenced by CHashPage::Defrag(), CHashTable::Insert(), CHashFile::Insert(), and CHashPage::Split().
#define LBUF_BLOCKED (SECTOR_SIZE*((LBUF_SIZE+SECTOR_SIZE-1)/SECTOR_SIZE)) |
#define SIZEOF_LOG_BUFFER 1024 |
Definition at line 289 of file svdhash.h.
Referenced by log_printf(), CLogFile::tinyprintf(), and CLogFile::WriteBuffer().
typedef struct tagHashFileCache HF_CACHE |
typedef unsigned long HF_FILEOFFSET |
typedef unsigned long * HF_PFILEOFFSET |
typedef UINT_OFFSET HP_DIRINDEX |
typedef struct tagHPHeader HP_HEADER |
typedef UINT_OFFSET HP_HEAPLENGTH |
typedef struct tagHPHeapNode HP_HEAPNODE |
typedef UINT_OFFSET HP_HEAPOFFSET |
typedef UINT_OFFSET * HP_PDIRINDEX |
typedef struct tagHPHeader * HP_PHEADER |
typedef UINT_OFFSET * HP_PHEAPLENGTH |
typedef struct tagHPHeapNode * HP_PHEAPNODE |
typedef UINT_OFFSET * HP_PHEAPOFFSET |
typedef struct tagHPTrailer * HP_PTRAILER |
typedef struct tagHPTrailer HP_TRAILER |
typedef CHashPage* pCHashPage |
typedef UINT32 UINT_OFFSET |
Definition at line 98 of file svdhash.cpp.
References CRC32_Table.
Referenced by FUNCTION(), and SeedRandomNumberGenerator().
00103 { 00104 UINT8 *pBuffer = (UINT8 *)arg_pBuffer; 00105 00106 ulCrc = ~ulCrc; 00107 while (nBuffer--) 00108 { 00109 ulCrc = CRC32_Table[((UINT8)*pBuffer++) ^ (UINT8)ulCrc] ^ (ulCrc >> 8); 00110 } 00111 return ~ulCrc; 00112 }
Definition at line 114 of file svdhash.cpp.
References CRC32_Table.
00115 { 00116 UINT32 ulCrc; 00117 ulCrc = ~nInteger; 00118 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00119 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00120 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00121 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00122 return ~ulCrc; 00123 }
Definition at line 125 of file svdhash.cpp.
References CRC32_Table.
Referenced by cache_del(), cache_get(), cache_put(), and pool_init().
00126 { 00127 UINT32 ulCrc; 00128 ulCrc = ~nInteger1; 00129 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00130 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00131 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00132 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00133 ulCrc ^= nInteger2; 00134 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00135 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00136 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00137 ulCrc = CRC32_Table[(UINT8)ulCrc] ^ (ulCrc >> 8); 00138 return ~ulCrc; 00139 }
Definition at line 148 of file svdhash.cpp.
References CRC32_Table, DO16, and Bigint::k.
Referenced by dbclean_RemoveStaleAttributeNames(), dbclean_RenumberAttributes(), hashaddLEN(), hashdeleteLEN(), hashfindLEN(), hashreplLEN(), vattr_define_LEN(), vattr_delete_LEN(), vattr_find_LEN(), and vattr_rename_LEN().
00153 { 00154 UINT8 *pBuffer = (UINT8 *)arg_pBuffer; 00155 ulHash = ~ulHash; 00156 00157 if (nBuffer <= 16) 00158 { 00159 pBuffer -= 16 - nBuffer; 00160 switch (nBuffer) 00161 { 00162 case 16: ulHash = CRC32_Table[pBuffer[0] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00163 case 15: ulHash = CRC32_Table[pBuffer[1] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00164 case 14: ulHash = CRC32_Table[pBuffer[2] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00165 case 13: ulHash = CRC32_Table[pBuffer[3] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00166 case 12: ulHash = CRC32_Table[pBuffer[4] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00167 case 11: ulHash = CRC32_Table[pBuffer[5] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00168 case 10: ulHash = CRC32_Table[pBuffer[6] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00169 case 9: ulHash = CRC32_Table[pBuffer[7] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00170 #if defined(UNALIGNED32) && defined(WORDS_LITTLEENDIAN) 00171 case 8: ulHash ^= *(UINT32 *)(pBuffer + 8); 00172 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00173 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00174 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00175 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00176 ulHash ^= *(UINT32 *)(pBuffer + 12); 00177 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00178 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00179 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00180 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00181 return ~ulHash; 00182 #else 00183 case 8: ulHash = CRC32_Table[pBuffer[8] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00184 #endif 00185 00186 case 7: ulHash = CRC32_Table[pBuffer[9] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00187 case 6: ulHash = CRC32_Table[pBuffer[10] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00188 case 5: ulHash = CRC32_Table[pBuffer[11] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00189 #if defined(UNALIGNED32) && defined(WORDS_LITTLEENDIAN) 00190 case 4: ulHash ^= *(UINT32 *)(pBuffer + 12); 00191 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00192 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00193 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00194 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00195 return ~ulHash; 00196 #else 00197 case 4: ulHash = CRC32_Table[pBuffer[12] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00198 #endif 00199 00200 case 3: ulHash = CRC32_Table[pBuffer[13] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00201 case 2: ulHash = CRC32_Table[pBuffer[14] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00202 case 1: ulHash = CRC32_Table[pBuffer[15] ^ (UINT8)ulHash] ^ (ulHash >> 8); 00203 case 0: return ~ulHash; 00204 } 00205 } 00206 00207 size_t nSmall = nBuffer & 15; 00208 size_t nMedium = (nBuffer >> 4) & 255; 00209 size_t nLarge = nBuffer >> 12; 00210 00211 UINT32 s1 = ulHash & 0xFFFF; 00212 UINT32 s2 = (ulHash >> 16) & 0xFFFF; 00213 00214 while (nLarge--) 00215 { 00216 int k = 256; 00217 while (k) 00218 { 00219 DO16(pBuffer); 00220 pBuffer += 16; 00221 k--; 00222 } 00223 ulHash = ~s1; 00224 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00225 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00226 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00227 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00228 ulHash ^= s2; 00229 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00230 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00231 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00232 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00233 ulHash = ~ulHash; 00234 s1 = ulHash & 0xFFFF; 00235 s2 = (ulHash >> 16) & 0xFFFF; 00236 } 00237 00238 while (nMedium--) 00239 { 00240 DO16(pBuffer); 00241 pBuffer += 16; 00242 } 00243 00244 pBuffer -= 15 - nSmall; 00245 switch (nSmall) 00246 { 00247 case 15: s1 += pBuffer[0]; s2 += s1; 00248 case 14: s1 += pBuffer[1]; s2 += s1; 00249 case 13: s1 += pBuffer[2]; s2 += s1; 00250 case 12: s1 += pBuffer[3]; s2 += s1; 00251 case 11: s1 += pBuffer[4]; s2 += s1; 00252 case 10: s1 += pBuffer[5]; s2 += s1; 00253 case 9: s1 += pBuffer[6]; s2 += s1; 00254 case 8: s1 += pBuffer[7]; s2 += s1; 00255 case 7: s1 += pBuffer[8]; s2 += s1; 00256 case 6: s1 += pBuffer[9]; s2 += s1; 00257 case 5: s1 += pBuffer[10]; s2 += s1; 00258 case 4: s1 += pBuffer[11]; s2 += s1; 00259 case 3: s1 += pBuffer[12]; s2 += s1; 00260 case 2: s1 += pBuffer[13]; s2 += s1; 00261 case 1: s1 += pBuffer[14]; s2 += s1; 00262 case 0: break; 00263 } 00264 00265 ulHash = ~s1; 00266 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00267 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00268 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00269 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00270 ulHash ^= s2; 00271 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00272 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00273 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00274 ulHash = CRC32_Table[(UINT8)ulHash] ^ (ulHash >> 8); 00275 return ~ulHash; 00276 }
int cs_dbreads |
Definition at line 21 of file svdhash.cpp.
Referenced by list_db_stats(), and CHashPage::ReadPage().
int cs_dbwrites |
Definition at line 22 of file svdhash.cpp.
Referenced by list_db_stats(), and CHashPage::WritePage().
int cs_dels |
int cs_fails |
Definition at line 19 of file svdhash.cpp.
Referenced by CHashFile::FindFirstKey(), and CHashFile::FindNextKey().
int cs_reads |
Definition at line 17 of file svdhash.cpp.
Referenced by CHashFile::FindFirstKey(), CHashFile::FindNextKey(), and list_db_stats().
int cs_rhits |
Definition at line 24 of file svdhash.cpp.
Referenced by CHashFile::FindFirstKey(), and list_db_stats().
int cs_syncs |
int cs_whits |
int cs_writes |
Definition at line 2563 of file svdhash.cpp.
Referenced by add_comsys(), AssertionFailed(), cache_del(), cache_put(), CF_HAND(), cf_log_notfound(), db_read(), db_write(), dbconvert(), del_comsys(), do_restart(), dup_bool(), end_log(), eval_boolexp(), CHashFile::FindFirstKey(), CHashTable::FindFirstKey(), get_list(), HelpIndex_Read(), info(), init_dbfile(), CHashPage::Insert(), CHashFile::Insert(), CHashTable::Insert(), load_channels(), load_comsys(), load_comsystem(), load_game(), load_malias(), log_name(), log_number(), log_perror(), log_printf(), log_text(), LogStatBuf(), main(), make_socket(), OutOfMemory(), pool_alloc(), pool_alloc_lbuf(), pool_err(), pool_free(), pool_free_lbuf(), putbool_subexp(), CHashFile::ReadCache(), CHashPage::ReadPage(), CHashFile::RebuildDirectory(), ReplaceFile(), report_timecheck(), save_comsys(), sighandler(), CHashPage::Split(), start_log(), CHashFile::Sync(), unparse_boolexp1(), write_pidfile(), and CHashPage::WritePage().