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, zend_uint 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()
55accel_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()
62accel_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, char *key, zend_uint key… in zend_accel_hash_update() argument
95 index = hash_value % accel_hash->max_num_entries; in zend_accel_hash_update()
98 entry = accel_hash->hash_table[index]; in zend_accel_hash_update()
112 accel_hash->num_direct_entries--; in zend_accel_hash_update()
125 if (accel_hash->num_entries == accel_hash->max_num_entries) { in zend_accel_hash_update()
129 entry = &accel_hash->hash_entries[accel_hash->num_entries++]; in zend_accel_hash_update()
134 accel_hash->num_direct_entries++; in zend_accel_hash_update()
141 entry->next = accel_hash->hash_table[index]; in zend_accel_hash_update()
142 accel_hash->hash_table[index] = entry; in zend_accel_hash_update()
149 void* zend_accel_hash_find(zend_accel_hash *accel_hash, char *key, zend_uint key_length) in zend_accel_hash_find() argument
162 index = hash_value % accel_hash->max_num_entries; in zend_accel_hash_find()
164 entry = accel_hash->hash_table[index]; in zend_accel_hash_find()
183 zend_accel_hash_entry* zend_accel_hash_find_entry(zend_accel_hash *accel_hash, char *key, zend_uint… in zend_accel_hash_find_entry() argument
196 index = hash_value % accel_hash->max_num_entries; in zend_accel_hash_find_entry()
198 entry = accel_hash->hash_table[index]; in zend_accel_hash_find_entry()
214 int zend_accel_hash_unlink(zend_accel_hash *accel_hash, char *key, zend_uint key_length) in zend_accel_hash_unlink() argument
227 index = hash_value % accel_hash->max_num_entries; in zend_accel_hash_unlink()
229 entry = accel_hash->hash_table[index]; in zend_accel_hash_unlink()
235 accel_hash->num_direct_entries--; in zend_accel_hash_unlink()
240 accel_hash->hash_table[index] = entry->next; in zend_accel_hash_unlink()