summaryrefslogtreecommitdiff
path: root/slabs.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2015-01-04 18:25:29 -0800
committerdormando <dormando@rydia.net>2015-01-04 18:25:29 -0800
commita0390847325deff97026ee494527dd1820a4cb1b (patch)
tree1def3a5b4dbe3525d12a3bd709cbcbdd2ba293d2 /slabs.h
parentf7bf26cb3d876730950f2f218b37fdb7a8136f48 (diff)
downloadmemcached-a0390847325deff97026ee494527dd1820a4cb1b.tar.gz
direct reclaim mode for evictions
Only way to do eviction case fast enough is to inline it, sadly. This finally deletes the old item_alloc code now that I'm not intending on reusing it. Also removes the condition wakeup for the background thread. Instead runs on a timer, and meters its aggressiveness by how much shuffling is going on. Also fixes a segfault in lru_pull_tail(), was unlinking `it` instead of `search`.
Diffstat (limited to 'slabs.h')
-rw-r--r--slabs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/slabs.h b/slabs.h
index 012089d..1eac5c8 100644
--- a/slabs.h
+++ b/slabs.h
@@ -19,7 +19,7 @@ void slabs_init(const size_t limit, const double factor, const bool prealloc);
unsigned int slabs_clsid(const size_t size);
/** Allocate object of given length. 0 on error */ /*@null@*/
-void *slabs_alloc(const size_t size, unsigned int id);
+void *slabs_alloc(const size_t size, unsigned int id, unsigned int *total_chunks);
/** Free previously allocated object */
void slabs_free(void *ptr, size_t size, unsigned int id);