it is not required that ht->t.size >= ht->min_table_size anymore
authorLai Jiangshan <laijs@cn.fujitsu.com>
Mon, 28 Nov 2011 13:05:09 +0000 (08:05 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 28 Nov 2011 13:05:09 +0000 (08:05 -0500)
commitd0d8f9aa03e9df3ca61b8c823678e5c3a9640a4d
treea75058a50922d2642dc0310b7357e7c45f1f99d7
parent48f1b16da05a3c5fdabd191e9b765ae812e8b488
it is not required that ht->t.size >= ht->min_table_size anymore

Original code always ensure ht->t.size >= ht->min_table_size.
This can be improved: ht->min_table_size should be used for allocation,
not for the bucket size in use.

Why does the original code need to always ensure this ?

  Original code don't do special alloc/free when

    ht->t.size < ht->min_table_size

  in init_table()/fini_table(), so we have to force

    ht->t.size >= ht->min_table_size.

Why does new code become flexible ?

  New code use the wrappers, they handle the special cases.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c
tests/test_urcu_hash.c
This page took 0.024985 seconds and 4 git commands to generate.