Lazyfree: pending objects count in INFO output.

This commit is contained in:
antirez
2015-09-28 10:51:25 +02:00
parent c69c6c80fb
commit 1f26a9468f
3 changed files with 10 additions and 2 deletions

View File

@ -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.