Lines Matching refs:accel_hash
32 void zend_accel_hash_clean(zend_accel_hash *accel_hash) in zend_accel_hash_clean() argument
34 accel_hash->num_entries = 0; in zend_accel_hash_clean()
35 accel_hash->num_direct_entries = 0; in zend_accel_hash_clean()
36 memset(accel_hash->hash_table, 0, sizeof(zend_accel_hash_entry *)*accel_hash->max_num_entries); in zend_accel_hash_clean()
39 void zend_accel_hash_init(zend_accel_hash *accel_hash, uint32_t hash_size) in zend_accel_hash_init() argument
50 accel_hash->num_entries = 0; in zend_accel_hash_init()
51 accel_hash->num_direct_entries = 0; in zend_accel_hash_init()
52 accel_hash->max_num_entries = hash_size; in zend_accel_hash_init()
55 …accel_hash->hash_table = zend_shared_alloc(sizeof(zend_accel_hash_entry *)*accel_hash->max_num_ent… in zend_accel_hash_init()
56 if (!accel_hash->hash_table) { in zend_accel_hash_init()
62 …accel_hash->hash_entries = zend_shared_alloc(sizeof(zend_accel_hash_entry)*accel_hash->max_num_ent… in zend_accel_hash_init()
63 if (!accel_hash->hash_entries) { in zend_accel_hash_init()
67 memset(accel_hash->hash_table, 0, sizeof(zend_accel_hash_entry *)*accel_hash->max_num_entries); in zend_accel_hash_init()
74 zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, const char *key, uint32_… in zend_accel_hash_update() argument
92 index = hash_value % accel_hash->max_num_entries; in zend_accel_hash_update()
95 entry = accel_hash->hash_table[index]; in zend_accel_hash_update()
109 accel_hash->num_direct_entries--; in zend_accel_hash_update()
122 if (accel_hash->num_entries == accel_hash->max_num_entries) { in zend_accel_hash_update()
126 entry = &accel_hash->hash_entries[accel_hash->num_entries++]; in zend_accel_hash_update()
131 accel_hash->num_direct_entries++; in zend_accel_hash_update()
138 entry->next = accel_hash->hash_table[index]; in zend_accel_hash_update()
139 accel_hash->hash_table[index] = entry; in zend_accel_hash_update()
143 static zend_always_inline void* zend_accel_hash_find_ex(zend_accel_hash *accel_hash, const char *ke… in zend_accel_hash_find_ex() argument
151 index = hash_value % accel_hash->max_num_entries; in zend_accel_hash_find_ex()
153 entry = accel_hash->hash_table[index]; in zend_accel_hash_find_ex()
180 void* zend_accel_hash_find(zend_accel_hash *accel_hash, zend_string *key) in zend_accel_hash_find() argument
183 accel_hash, in zend_accel_hash_find()
193 zend_accel_hash_entry* zend_accel_hash_find_entry(zend_accel_hash *accel_hash, zend_string *key) in zend_accel_hash_find_entry() argument
196 accel_hash, in zend_accel_hash_find_entry()
206 void* zend_accel_hash_str_find(zend_accel_hash *accel_hash, const char *key, uint32_t key_length) in zend_accel_hash_str_find() argument
209 accel_hash, in zend_accel_hash_str_find()
219 zend_accel_hash_entry* zend_accel_hash_str_find_entry(zend_accel_hash *accel_hash, const char *key,… in zend_accel_hash_str_find_entry() argument
222 accel_hash, in zend_accel_hash_str_find_entry()
229 int zend_accel_hash_unlink(zend_accel_hash *accel_hash, const char *key, uint32_t key_length) in zend_accel_hash_unlink() argument
239 index = hash_value % accel_hash->max_num_entries; in zend_accel_hash_unlink()
241 entry = accel_hash->hash_table[index]; in zend_accel_hash_unlink()
247 accel_hash->num_direct_entries--; in zend_accel_hash_unlink()
252 accel_hash->hash_table[index] = entry->next; in zend_accel_hash_unlink()