Changeset 1909 for trunk/src/kmk/strcache2.h
- Timestamp:
- Oct 22, 2008, 8:49:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/strcache2.h
r1908 r1909 33 33 34 34 #define STRCACHE2_USE_MASK 1 35 #define STRCACHE2_USE_CHAINING 1 35 36 36 37 /* string cache memory segment. */ … … 47 48 struct strcache2_entry 48 49 { 50 #ifdef STRCACHE2_USE_CHAINING 51 struct strcache2_entry *next; /* Collision chain. */ 52 #endif 49 53 void *user; 50 54 unsigned int hash1; 55 #ifndef STRCACHE2_USE_CHAINING 51 56 unsigned int hash2; 57 #endif 52 58 unsigned int length; 53 59 }; … … 83 89 unsigned long collision_3rd_count; /* The number of 3rd level collisions. */ 84 90 unsigned int count; /* Number entries in the cache. */ 91 #ifdef STRCACHE2_USE_CHAINING 92 unsigned int collision_count; /* Number of entries in chains. */ 93 #endif 85 94 unsigned int rehash_count; /* When to rehash the table. */ 86 95 unsigned int init_size; /* The initial hash table size. */ … … 146 155 } 147 156 157 #ifndef STRCACHE2_USE_CHAINING 148 158 /* Get the second hash value for the string. */ 149 159 MY_INLINE unsigned int … … 155 165 return hash2; 156 166 } 167 #endif 157 168 158 169 /* Get the pointer hash value for the string.
Note:
See TracChangeset
for help on using the changeset viewer.