mirror of
https://github.com/fluencelabs/redis
synced 2025-06-23 14:01:34 +00:00
Move the struct evictionPoolEntry() into only file using it.
Local scope is always better when possible.
This commit is contained in:
13
src/server.h
13
src/server.h
@ -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
|
||||
|
Reference in New Issue
Block a user