1 #ifndef JEMALLOC_INTERNAL_CKH_STRUCTS_H 2 #define JEMALLOC_INTERNAL_CKH_STRUCTS_H 3 4 /* Hash table cell. */ 5 struct ckhc_s { 6 const void *key; 7 const void *data; 8 }; 9 10 struct ckh_s { 11 #ifdef CKH_COUNT 12 /* Counters used to get an idea of performance. */ 13 uint64_t ngrows; 14 uint64_t nshrinks; 15 uint64_t nshrinkfails; 16 uint64_t ninserts; 17 uint64_t nrelocs; 18 #endif 19 20 /* Used for pseudo-random number generation. */ 21 uint64_t prng_state; 22 23 /* Total number of items. */ 24 size_t count; 25 26 /* 27 * Minimum and current number of hash table buckets. There are 28 * 2^LG_CKH_BUCKET_CELLS cells per bucket. 29 */ 30 unsigned lg_minbuckets; 31 unsigned lg_curbuckets; 32 33 /* Hash and comparison functions. */ 34 ckh_hash_t *hash; 35 ckh_keycomp_t *keycomp; 36 37 /* Hash table with 2^lg_curbuckets buckets. */ 38 ckhc_t *tab; 39 }; 40 41 #endif /* JEMALLOC_INTERNAL_CKH_STRUCTS_H */ 42