From: Lai Jiangshan Date: Mon, 28 Nov 2011 13:05:09 +0000 (-0500) Subject: it is not required that ht->t.size >= ht->min_table_size anymore X-Git-Tag: v0.7.0~43^2~44 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=d0d8f9aa03e9df3ca61b8c823678e5c3a9640a4d;hp=d0d8f9aa03e9df3ca61b8c823678e5c3a9640a4d;p=urcu.git 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 Signed-off-by: Mathieu Desnoyers ---