summaryrefslogtreecommitdiff
path: root/slabs.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2015-10-09 20:59:04 -0700
committerdormando <dormando@rydia.net>2015-11-18 23:14:36 -0800
commitb1debc4c96134e9014a929c32d6990cb5d66a22c (patch)
tree47ef4449d33be9603f3dc9c1c041b7688b784b92 /slabs.h
parent8fa54f7e43e0ff3ea0f555cb52fd2dda01db3efa (diff)
downloadmemcached-b1debc4c96134e9014a929c32d6990cb5d66a22c.tar.gz
try harder to save items
previously the slab mover would evict items if the new chunk was within the slab page being moved. now it will do an inline reclaim of the chunk and try until it runs out of memory.
Diffstat (limited to 'slabs.h')
-rw-r--r--slabs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/slabs.h b/slabs.h
index fb29cfa..b993b5f 100644
--- a/slabs.h
+++ b/slabs.h
@@ -19,7 +19,8 @@ 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, unsigned int *total_chunks);
+#define SLABS_ALLOC_NO_NEWPAGE 1
+void *slabs_alloc(const size_t size, unsigned int id, unsigned int *total_chunks, unsigned int flags);
/** Free previously allocated object */
void slabs_free(void *ptr, size_t size, unsigned int id);