From b1acbf1b0a56e45dfa5c6ee93fc237e0eebbcb86 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sat, 7 Mar 2015 01:01:35 -0500 Subject: [PATCH] ck_ht: Set floor to cacheline entries. --- src/ck_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ck_ht.c b/src/ck_ht.c index e3eed2f..0e0445b 100644 --- a/src/ck_ht.c +++ b/src/ck_ht.c @@ -147,7 +147,7 @@ ck_ht_map_create(struct ck_ht *table, uint64_t entries) n_entries = ck_internal_power_2(entries); if (n_entries < CK_HT_BUCKET_LENGTH) - return NULL; + n_entries = CK_HT_BUCKET_LENGTH; size = sizeof(struct ck_ht_map) + (sizeof(struct ck_ht_entry) * n_entries + CK_MD_CACHELINE - 1);