summaryrefslogtreecommitdiff
path: root/items.h
diff options
context:
space:
mode:
authorEiichi Tsukata <devel@etsukata.com>2016-03-26 01:24:37 +0900
committerdormando <dormando@rydia.net>2016-07-13 11:18:51 -0700
commit690a9a9d413af61e38610788c1ed54fcc7b0e8b1 (patch)
tree9c2a5268c606d08e4415cad367e5cbc9448dace3 /items.h
parent3cee7d1b82ba680b70a1c2e5c16b01811431c42d (diff)
downloadmemcached-690a9a9d413af61e38610788c1ed54fcc7b0e8b1.tar.gz
fix zero hash items eviction
If all hash values of five tail items are zero on the specified slab class, expire check is unintentionally skipped and items stay without being evicted. Consequently, new item allocation consume memory space every time an item is set, that leads to slab OOM errors.
Diffstat (limited to 'items.h')
-rw-r--r--items.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/items.h b/items.h
index d235f87..32aefb8 100644
--- a/items.h
+++ b/items.h
@@ -2,7 +2,7 @@
uint64_t get_cas_id(void);
/*@null@*/
-item *do_item_alloc(char *key, const size_t nkey, const unsigned int flags, const rel_time_t exptime, const int nbytes, const uint32_t cur_hv);
+item *do_item_alloc(char *key, const size_t nkey, const unsigned int flags, const rel_time_t exptime, const int nbytes);
void item_free(item *it);
bool item_size_ok(const size_t nkey, const int flags, const int nbytes);