Move the struct evictionPoolEntry() into only file using it.

Local scope is always better when possible.
This commit is contained in:
antirez
2016-07-07 15:04:25 +02:00
parent d8e92a8207
commit 965905c9f2
2 changed files with 22 additions and 12 deletions

View File

@ -550,18 +550,7 @@ typedef struct redisObject {
_var.ptr = _ptr; \
} while(0)
/* To improve the quality of the LRU approximation we take a set of keys
* that are good candidate for eviction across freeMemoryIfNeeded() calls.
*
* Entries inside the eviciton pool are taken ordered by idle time, putting
* greater idle times to the right (ascending order).
*
* Empty entries have the key pointer set to NULL. */
#define MAXMEMORY_EVICTION_POOL_SIZE 16
struct evictionPoolEntry {
unsigned long long idle; /* Object idle time. */
sds key; /* Key name. */
};
struct evictionPoolEntry; /* Defined in evict.c */
/* Redis database representation. There are multiple databases identified
* by integers from 0 (the default database) up to the max configured