summaryrefslogtreecommitdiff
path: root/src/lazyfree.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-09-28 10:51:25 +0200
committerantirez <antirez@gmail.com>2015-10-01 13:02:26 +0200
commit1f26a9468ff3e61ee9ae4225628647d4054fe20c (patch)
tree6c89addf6afed3b05c58f93ab28f647e4ded5764 /src/lazyfree.c
parentc69c6c80fb5376a30e8cda34443a55b6326c9aa7 (diff)
downloadredis-1f26a9468ff3e61ee9ae4225628647d4054fe20c.tar.gz
Lazyfree: pending objects count in INFO output.
Diffstat (limited to 'src/lazyfree.c')
-rw-r--r--src/lazyfree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lazyfree.c b/src/lazyfree.c
index 321bd5411..e471ba004 100644
--- a/src/lazyfree.c
+++ b/src/lazyfree.c
@@ -6,6 +6,11 @@
static size_t lazyfree_objects = 0;
pthread_mutex_t lazyfree_objects_mutex = PTHREAD_MUTEX_INITIALIZER;
+/* Return the number of currently pending objects to free. */
+size_t lazyfreeGetPendingObjectsCount(void) {
+ return lazyfree_objects;
+}
+
/* Return the amount of work needed in order to free an object.
* The return value is not always the actual number of allocations the
* object is compoesd of, but a number proportional to it.