add max_nr_buckets argument
[urcu.git] / tests / test_urcu_hash.c
index fe650f36a083a81d08991bf1a6b18c85baccd098..043a33a9353105eac57e2363693bdfb41c49f12c 100644 (file)
@@ -896,7 +896,7 @@ int main(int argc, char **argv)
                return -1;
        }
 
-       if (min_hash_alloc_size && min_hash_alloc_size * (min_hash_alloc_size - 1)) {
+       if (min_hash_alloc_size && min_hash_alloc_size & (min_hash_alloc_size - 1)) {
                printf("Error: Min hash alloc size %lu is not a power of 2.\n",
                        min_hash_alloc_size);
                return -1;
@@ -967,7 +967,7 @@ int main(int argc, char **argv)
         * thread from the point of view of resize.
         */
        rcu_register_thread();
-       test_ht = cds_lfht_new(init_hash_size, min_hash_alloc_size,
+       test_ht = cds_lfht_new(init_hash_size, min_hash_alloc_size, (1UL << 18),
                        (opt_auto_resize ? CDS_LFHT_AUTO_RESIZE : 0) |
                        CDS_LFHT_ACCOUNTING, NULL);
        ret = populate_hash();
This page took 0.023413 seconds and 4 git commands to generate.