Lines Matching refs:alloc

70         map->alloc = 0;  in mp_map_init()
73 map->alloc = n; in mp_map_init()
74 map->table = m_new0(mp_map_elem_t, map->alloc); in mp_map_init()
83 map->alloc = n; in mp_map_init_fixed_table()
94 m_del(mp_map_elem_t, map->table, map->alloc); in mp_map_deinit()
96 map->used = map->alloc = 0; in mp_map_deinit()
101 m_del(mp_map_elem_t, map->table, map->alloc); in mp_map_clear()
103 map->alloc = 0; in mp_map_clear()
111 size_t old_alloc = map->alloc; in mp_map_rehash()
112 size_t new_alloc = get_hash_alloc_greater_or_equal_to(map->alloc + 1); in mp_map_rehash()
117 map->alloc = new_alloc; in mp_map_rehash()
182 if (map->used == map->alloc) { in mp_map_lookup()
184 map->alloc += 4; in mp_map_lookup()
185 map->table = m_renew(mp_map_elem_t, map->table, map->used, map->alloc); in mp_map_lookup()
186 mp_seq_clear(map->table, map->used, map->alloc, sizeof(*map->table)); in mp_map_lookup()
201 if (map->alloc == 0) { in mp_map_lookup()
217 size_t pos = hash % map->alloc; in mp_map_lookup()
249 if (map->table[(pos + 1) % map->alloc].key == MP_OBJ_NULL) { in mp_map_lookup()
261 pos = (pos + 1) % map->alloc; in mp_map_lookup()
279 start_pos = pos = hash % map->alloc; in mp_map_lookup()
294 set->alloc = n; in mp_set_init()
296 set->table = m_new0(mp_obj_t, set->alloc); in mp_set_init()
300 size_t old_alloc = set->alloc; in mp_set_rehash()
302 set->alloc = get_hash_alloc_greater_or_equal_to(set->alloc + 1); in mp_set_rehash()
304 set->table = m_new0(mp_obj_t, set->alloc); in mp_set_rehash()
317 if (set->alloc == 0) { in mp_set_lookup()
325 size_t pos = hash % set->alloc; in mp_set_lookup()
352 if (set->table[(pos + 1) % set->alloc] == MP_OBJ_NULL) { in mp_set_lookup()
363 pos = (pos + 1) % set->alloc; in mp_set_lookup()
377 start_pos = pos = hash % set->alloc; in mp_set_lookup()
387 for (size_t pos = 0; pos < set->alloc; pos++) { in mp_set_remove_first()
392 if (set->table[(pos + 1) % set->alloc] == MP_OBJ_NULL) { in mp_set_remove_first()
405 m_del(mp_obj_t, set->table, set->alloc); in mp_set_clear()
406 set->alloc = 0; in mp_set_clear()
415 for (size_t i = 0; i < map->alloc; i++) { in mp_map_dump()