*_table = NULL;
+ i_assert(table->frozen == 0);
+
if (!table->node_pool->alloconly_pool) {
hash_table_destroy_nodes(table);
destroy_node_list(table, table->free_nodes);
void hash_table_clear(struct hash_table *table, bool free_nodes)
{
+ i_assert(table->frozen == 0);
+
if (!table->node_pool->alloconly_pool)
hash_table_destroy_nodes(table);
{
struct hash_node *node, *next;
+ i_assert(table->frozen == 0);
+
/* remove deleted nodes from the list */
for (node = root; node->next != NULL; ) {
next = node->next;
unsigned int next_size, old_size, i;
float nodes_per_list;
+ i_assert(table->frozen == 0);
+
nodes_per_list = (float) table->nodes_count / (float) table->size;
if (nodes_per_list > 0.3 && nodes_per_list < 2.0)
return FALSE;